diff mbox series

[net] mac80211: fix locking in ieee80211_restart_work()

Message ID 20210817121210.47bdb177064f.Ib1ef79440cd27f318c028ddfc0c642406917f512@changeid (mailing list archive)
State Accepted
Commit 276e189f8e4e3cce1634d6bac4ed0d9ca242441b
Delegated to: Netdev Maintainers
Headers show
Series [net] mac80211: fix locking in ieee80211_restart_work() | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers fail 2 blamed authors not CCed: ilan.peer@intel.com luciano.coelho@intel.com; 4 maintainers not CCed: davem@davemloft.net kuba@kernel.org ilan.peer@intel.com luciano.coelho@intel.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 1 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 0
netdev/header_inline success Link

Commit Message

Johannes Berg Aug. 17, 2021, 10:12 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

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>
---
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(+)

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 17, 2021, 2 p.m. UTC | #1
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 <johannes.berg@intel.com>
> 
> 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>
> 
> [...]

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
diff mbox series

Patch

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__);