From: Michael Buesch There are several calls of kmalloc with GFP_KERNEL in atomic context in the code. I think the attached patch fixes all calls with GFP_KERNEL in atomic code, by using GFP_ATOMIC. I grepped the source for GFP_KERNEL and I hope I found all errors. Signed-off-by: Jiri Benc diff -urNX dscape/Documentation/dontdiff dscape/net/ieee80211.orig/ieee80211_sta.c dscape/net/ieee80211/ieee80211_sta.c --- dscape/net/ieee80211.orig/ieee80211_sta.c 2005-12-18 16:53:15.000000000 +0100 +++ dscape/net/ieee80211/ieee80211_sta.c 2005-12-18 17:00:59.000000000 +0100 @@ -320,7 +320,7 @@ return; buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len + - ifsta->assocresp_ies_len), GFP_KERNEL); + ifsta->assocresp_ies_len), GFP_ATOMIC); if (buf == NULL) return; @@ -573,7 +573,7 @@ kfree(ifsta->assocreq_ies); ifsta->assocreq_ies_len = (skb->data + skb->len) - ies; - ifsta->assocreq_ies = kmalloc(ifsta->assocreq_ies_len, GFP_KERNEL); + ifsta->assocreq_ies = kmalloc(ifsta->assocreq_ies_len, GFP_ATOMIC); if (ifsta->assocreq_ies) memcpy(ifsta->assocreq_ies, ies, ifsta->assocreq_ies_len); @@ -1151,7 +1151,7 @@ kfree(ifsta->assocresp_ies); ifsta->assocresp_ies_len = len - (pos - (u8 *) mgmt); - ifsta->assocresp_ies = kmalloc(ifsta->assocresp_ies_len, GFP_KERNEL); + ifsta->assocresp_ies = kmalloc(ifsta->assocresp_ies_len, GFP_ATOMIC); if (ifsta->assocresp_ies) memcpy(ifsta->assocresp_ies, pos, ifsta->assocresp_ies_len); diff -urNX dscape/Documentation/dontdiff dscape/net/ieee80211.orig/rate_control.c dscape/net/ieee80211/rate_control.c --- dscape/net/ieee80211.orig/rate_control.c 2005-12-18 16:53:15.000000000 +0100 +++ dscape/net/ieee80211/rate_control.c 2005-12-18 16:54:39.000000000 +0100 @@ -286,7 +286,7 @@ { struct global_rate_control *rctrl; - rctrl = kmalloc(sizeof(*rctrl), GFP_KERNEL); + rctrl = kmalloc(sizeof(*rctrl), GFP_ATOMIC); if (rctrl == NULL) { return NULL; } @@ -311,7 +311,7 @@ { struct sta_rate_control *rctrl; - rctrl = kmalloc(sizeof(*rctrl), GFP_KERNEL); + rctrl = kmalloc(sizeof(*rctrl), GFP_ATOMIC); if (rctrl == NULL) { return NULL; }