summaryrefslogtreecommitdiff
path: root/net/wireless/pmsr.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-06-06 14:49:21 +0200
committerJohannes Berg <johannes.berg@intel.com>2023-06-07 19:53:07 +0200
commit0dcb84ede5b0a99fc125df2f82ca1f539d41446d (patch)
tree2814b4eecc7feb2b8fd6dce95fb203bc121218c9 /net/wireless/pmsr.c
parente9da6df7492a981b071bafd169fb4c35b45f5ebf (diff)
wifi: cfg80211: hold wiphy lock in pmsr work
Most code paths in cfg80211 already hold the wiphy lock, mostly by virtue of being called from nl80211, so make the pmsr cleanup worker also hold it, aligning the locking promises between different parts of cfg80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/pmsr.c')
-rw-r--r--net/wireless/pmsr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/pmsr.c b/net/wireless/pmsr.c
index 2bc647720cda..77000a264855 100644
--- a/net/wireless/pmsr.c
+++ b/net/wireless/pmsr.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2018 - 2021 Intel Corporation
+ * Copyright (C) 2018 - 2021, 2023 Intel Corporation
*/
#include <net/cfg80211.h>
#include "core.h"
@@ -623,9 +623,11 @@ void cfg80211_pmsr_free_wk(struct work_struct *work)
struct wireless_dev *wdev = container_of(work, struct wireless_dev,
pmsr_free_wk);
+ wiphy_lock(wdev->wiphy);
wdev_lock(wdev);
cfg80211_pmsr_process_abort(wdev);
wdev_unlock(wdev);
+ wiphy_unlock(wdev->wiphy);
}
void cfg80211_pmsr_wdev_down(struct wireless_dev *wdev)