Skip to content

Commit 276e189

Browse files
jmberg-intelkuba-moo
authored andcommitted
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: 45daaa1 ("mac80211: Properly WARN on HW scan before restart") Signed-off-by: Johannes Berg <[email protected]> Link: https://lore.kernel.org/r/20210817121210.47bdb177064f.Ib1ef79440cd27f318c028ddfc0c642406917f512@changeid Signed-off-by: Jakub Kicinski <[email protected]>
1 parent dbcf24d commit 276e189

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/mac80211/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ static void ieee80211_restart_work(struct work_struct *work)
260260
flush_work(&local->radar_detected_work);
261261

262262
rtnl_lock();
263+
/* we might do interface manipulations, so need both */
264+
wiphy_lock(local->hw.wiphy);
263265

264266
WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
265267
"%s called with hardware scan in progress\n", __func__);

0 commit comments

Comments
 (0)