diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2014-08-06 11:32:00 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-08-26 00:17:38 +0400 |
commit | 48e81a15fa40dce4553ae3156e170a2be9562fa9 (patch) | |
tree | 0604460e334682649f11960b8a979136b7939f4f | |
parent | 8fcfdeac97ee3ee8dd8e0e44b6a3b9d49b951bbd (diff) | |
download | linux-48e81a15fa40dce4553ae3156e170a2be9562fa9.tar.xz |
wil6210: cfg80211_rx_mgmt to use GFP_ATOMIC
Internally, cfg80211_rx_mgmt() takes lock:
spin_lock_bh(&wdev->mgmt_registrations_lock);
and therefore one can't use it with GFP_KERNEL allocation flags.
When called with GFP_KERNEL, "sleep while atomic" warning triggered:
<3>[242645.446224] BUG: sleeping function called from invalid context at kernel/mm/slub.c:926
<3>[242645.455516] in_atomic(): 1, irqs_disabled(): 0, pid: 18881, name: kworker/u16:0
<6>[242645.462868] CPU: 0 PID: 18881 Comm: kworker/u16:0 Tainted: G O 3.10.40-g619a884-00001-g357fa9c #2
<6>[242645.463044] Workqueue: wil6210_wmi wmi_event_worker [wil6210]
<6>[242645.463087] Call trace:
<6>[242645.463157] [<ffffffc000087390>] dump_backtrace+0x0/0x144
<6>[242645.463205] [<ffffffc0000874e4>] show_stack+0x10/0x1c
<6>[242645.463259] [<ffffffc0009abc04>] dump_stack+0x1c/0x28
<6>[242645.463313] [<ffffffc0000c10c0>] __might_sleep+0xe0/0xf0
<6>[242645.463365] [<ffffffc00015a514>] kmem_cache_alloc+0x48/0x1e4
<6>[242645.463414] [<ffffffc00080d468>] __alloc_skb+0x48/0x164
<6>[242645.463466] [<ffffffc00097f2c4>] nl80211_send_mgmt+0x4c/0x1dc
<6>[242645.463511] [<ffffffc000980268>] cfg80211_rx_mgmt+0x1bc/0x25c
<6>[242645.463647] [<ffffffbffc005d64>] wmi_evt_rx_mgmt+0x21c/0x23c [wil6210]
<6>[242645.463783] [<ffffffbffc0073b8>] wmi_event_worker+0x230/0x2f8 [wil6210]
<6>[242645.463838] [<ffffffc0000afffc>] process_one_work+0x258/0x3d0
<6>[242645.463887] [<ffffffc0000b0fe0>] worker_thread+0x1f0/0x310
<6>[242645.463946] [<ffffffc0000b642c>] kthread+0xac/0xb8
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 596d6c1e8583..1b64823544eb 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -355,7 +355,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len) } } else { cfg80211_rx_mgmt(wil->wdev, freq, signal, - (void *)rx_mgmt_frame, d_len, 0, GFP_KERNEL); + (void *)rx_mgmt_frame, d_len, 0, GFP_ATOMIC); } } |