mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
7a53b71d8e
commit
332e68bc55
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue