summaryrefslogtreecommitdiff
path: root/net/wireless/core.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/core.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/core.c')
-rw-r--r--net/wireless/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 061f7a6dd279..2e12b166c6fc 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1145,8 +1145,6 @@ static void _cfg80211_unregister_wdev(struct wireless_dev *wdev,
ASSERT_RTNL();
lockdep_assert_held(&rdev->wiphy.mtx);
- flush_work(&wdev->pmsr_free_wk);
-
nl80211_notify_iface(rdev, wdev, NL80211_CMD_DEL_INTERFACE);
wdev->registered = false;
@@ -1453,6 +1451,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
wiphy_unlock(&rdev->wiphy);
/* since we just did cfg80211_leave() nothing to do there */
cancel_work_sync(&wdev->disconnect_wk);
+ cancel_work_sync(&wdev->pmsr_free_wk);
break;
case NETDEV_DOWN:
wiphy_lock(&rdev->wiphy);