diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-08-28 13:59:59 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-11 11:27:22 +0200 |
commit | 332e68bc5526226f50a946b5dd980bba12902595 (patch) | |
tree | 37ac0176dc1e2446443e503ec50447dde374f6d0 /net/mac80211/iface.c | |
parent | wifi: mac80211: hold wiphy_lock around concurrency checks (diff) | |
download | linux-332e68bc5526226f50a946b5dd980bba12902595.tar.xz linux-332e68bc5526226f50a946b5dd980bba12902595.zip |
wifi: mac80211: extend wiphy lock in interface removal
We want to extend the wiphy locking to the interface list,
so move that into the section locked with the wiphy lock.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index c528a4bb7f4f..a465a18bf3bd 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -2274,6 +2274,8 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local) */ cfg80211_shutdown_all_interfaces(local->hw.wiphy); + wiphy_lock(local->hw.wiphy); + WARN(local->open_count, "%s: open count remains %d\n", wiphy_name(local->hw.wiphy), local->open_count); @@ -2283,7 +2285,6 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local) list_splice_init(&local->interfaces, &unreg_list); mutex_unlock(&local->iflist_mtx); - wiphy_lock(local->hw.wiphy); list_for_each_entry_safe(sdata, tmp, &unreg_list, list) { bool netdev = sdata->dev; |