From: Helmut Schaa Date: Tue, 17 Jan 2012 08:22:49 +0000 (+0100) Subject: mac80211: Fix possible race between sta_unblock and network softirq X-Git-Tag: v3.3-rc1~17^2~6^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=544204733a20200951c271f81c74930ba5424638;p=profile%2Fcommon%2Fkernel-common.git mac80211: Fix possible race between sta_unblock and network softirq All other code paths in sta_unblock synchronize with the network softirq by using local_bh_disable/enable. Do the same around ieee80211_sta_ps_deliver_wakeup. Signed-off-by: Helmut Schaa Signed-off-by: John W. Linville --- diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 3c428d4..ff11f6b 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -238,9 +238,11 @@ static void sta_unblock(struct work_struct *wk) if (sta->dead) return; - if (!test_sta_flag(sta, WLAN_STA_PS_STA)) + if (!test_sta_flag(sta, WLAN_STA_PS_STA)) { + local_bh_disable(); ieee80211_sta_ps_deliver_wakeup(sta); - else if (test_and_clear_sta_flag(sta, WLAN_STA_PSPOLL)) { + local_bh_enable(); + } else if (test_and_clear_sta_flag(sta, WLAN_STA_PSPOLL)) { clear_sta_flag(sta, WLAN_STA_PS_DRIVER); local_bh_disable();