From dafeac387d7f10d12d4fa9cc626af43c805540f7 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 23 Oct 2010 15:02:02 +0200 Subject: [PATCH] carl9170: fix scheduling while atomic This patch fixes the following mishap: BUG: scheduling while atomic: wpa_supplicant/4164/0x00000002 Modules linked in: carl9170 mac80211 [...] Pid: 4164, comm: wpa_supplicant Not tainted 2.6.36-wl+ #119 Call Trace: [] ? schedule+0x349/0x4c0 [] ? schedule_timeout+0x106/0x1e0 [] ? process_timeout+0x0/0x10 [] ? wait_for_common+0x9d/0x140 [] ? default_wake_function+0x0/0x10 [] ? carl9170_exec_cmd+0xf0/0x250 [carl9170] [] ? carl9170_set_mac_reg+0x5e/0x70 [carl9170] [] ? carl9170_op_add_interface+0x176/0x310 [carl9170] [...] rcu_read_unlock() call was erroneously placed after the sync. function carl9170_mod_virtual_mac. Signed-off-by: Christian Lamparter Signed-off-by: John W. Linville --- drivers/net/wireless/ath/carl9170/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index 3cc99f3f7ab5..980ae70ea424 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c @@ -639,8 +639,8 @@ init: if (err) goto unlock; } else { - err = carl9170_mod_virtual_mac(ar, vif_id, vif->addr); rcu_read_unlock(); + err = carl9170_mod_virtual_mac(ar, vif_id, vif->addr); if (err) goto unlock;