Commit 54420473 authored by Helmut Schaa's avatar Helmut Schaa Committed by John W. Linville

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: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d981e059
...@@ -238,9 +238,11 @@ static void sta_unblock(struct work_struct *wk) ...@@ -238,9 +238,11 @@ static void sta_unblock(struct work_struct *wk)
if (sta->dead) if (sta->dead)
return; 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); 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); clear_sta_flag(sta, WLAN_STA_PS_DRIVER);
local_bh_disable(); local_bh_disable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment