Skip to content

Commit ed405be

Browse files
committed
mac80211: fix sdata locking around __ieee80211_request_smps
My cfg80211/mac80211 locking unification broke the sdata locking in ieee80211_set_power_mgmt, it needs to acquire the lock for __ieee80211_request_smps(). Add the locking. Reported-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent a8cd57b commit ed405be

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎net/mac80211/cfg.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,7 +2378,9 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
23782378
local->dynamic_ps_forced_timeout = timeout;
23792379

23802380
/* no change, but if automatic follow powersave */
2381+
sdata_lock(sdata);
23812382
__ieee80211_request_smps(sdata, sdata->u.mgd.req_smps);
2383+
sdata_unlock(sdata);
23822384

23832385
if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)
23842386
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);

0 commit comments

Comments
 (0)