1
0
Fork 0

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>
hifive-unleashed-5.1
Helmut Schaa 2012-01-17 09:22:49 +01:00 committed by John W. Linville
parent d981e05908
commit 544204733a
1 changed files with 4 additions and 2 deletions

View File

@ -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();