summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-08-17 12:12:22 +0200
committerJakub Kicinski <kuba@kernel.org>2021-08-17 06:51:43 -0700
commit276e189f8e4e3cce1634d6bac4ed0d9ca242441b (patch)
tree8bcf78666e09133084d6c192e04db75891ff41fc /net/mac80211
parentdbcf24d153884439dad30484a0e3f02350692e4c (diff)
downloadlinux-stable-276e189f8e4e3cce1634d6bac4ed0d9ca242441b.tar.gz
linux-stable-276e189f8e4e3cce1634d6bac4ed0d9ca242441b.tar.bz2
linux-stable-276e189f8e4e3cce1634d6bac4ed0d9ca242441b.zip
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: 45daaa131841 ("mac80211: Properly WARN on HW scan before restart") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://lore.kernel.org/r/20210817121210.47bdb177064f.Ib1ef79440cd27f318c028ddfc0c642406917f512@changeid Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 05f4c3c72619..fcae76ddd586 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -260,6 +260,8 @@ static void ieee80211_restart_work(struct work_struct *work)
flush_work(&local->radar_detected_work);
rtnl_lock();
+ /* we might do interface manipulations, so need both */
+ wiphy_lock(local->hw.wiphy);
WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
"%s called with hardware scan in progress\n", __func__);