[PATCH net] mac80211: fix locking in ieee80211_restart_work()

Subsystems: mac80211, the rest

STALE1813d LANDED

Landed in mainline as 276e189f8e4e on 2021-08-17.

2 messages, 2 authors, 2021-08-17 · open the first message on its own page

[PATCH net] mac80211: fix locking in ieee80211_restart_work()

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2021-08-17 10:12:39

From: Johannes Berg <redacted>

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 <redacted>
---
Can you please apply this directly to net? I don't have any
other patches, so not much sense in sending a pull request.
---
 net/mac80211/main.c | 2 ++
 1 file changed, 2 insertions(+)
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__);
-- 
2.31.1

Re: [PATCH net] mac80211: fix locking in ieee80211_restart_work()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-08-17 14:00:10

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue, 17 Aug 2021 12:12:22 +0200 you wrote:
From: Johannes Berg <redacted>

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 <redacted>

[...]
Here is the summary with links:
  - [net] mac80211: fix locking in ieee80211_restart_work()
    https://git.kernel.org/netdev/net/c/276e189f8e4e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help