summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2012-01-17 09:22:49 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-01-17 10:12:27 -0500
commit544204733a20200951c271f81c74930ba5424638 (patch)
tree02fc04707eb974cf28bcac4e2fa0583dc4bfdd39 /net
parentd981e05908f85beb68ae0d935e59c5e399d2136e (diff)
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 <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/sta_info.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 3c428d4839c7..ff11f6bf8266 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();