Commit 276e189f authored by Johannes Berg's avatar Johannes Berg Committed by Jakub Kicinski

mac80211: fix locking in ieee80211_restart_work()

Ilan's change to move locking around accidentally lost the
wiphy_lock() during some porting, add it back.

Fixes: 45daaa13 ("mac80211: Properly WARN on HW scan before restart")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20210817121210.47bdb177064f.Ib1ef79440cd27f318c028ddfc0c642406917f512@changeidSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent dbcf24d1
...@@ -260,6 +260,8 @@ static void ieee80211_restart_work(struct work_struct *work) ...@@ -260,6 +260,8 @@ static void ieee80211_restart_work(struct work_struct *work)
flush_work(&local->radar_detected_work); flush_work(&local->radar_detected_work);
rtnl_lock(); rtnl_lock();
/* we might do interface manipulations, so need both */
wiphy_lock(local->hw.wiphy);
WARN(test_bit(SCAN_HW_SCANNING, &local->scanning), WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
"%s called with hardware scan in progress\n", __func__); "%s called with hardware scan in progress\n", __func__);
......
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