Re: [syzbot] [net?] possible deadlock in team_del_slave (3)

From: Jeongjun Park
Date: Sun Jul 07 2024 - 02:07:06 EST


#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

---
net/mac80211/iface.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 7ac4a62ed536..e55b1c2654ab 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -2286,6 +2286,8 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
list_splice_init(&local->interfaces, &unreg_list);
mutex_unlock(&local->iflist_mtx);

+ wiphy_unlock(local->hw.wiphy);
+
list_for_each_entry_safe(sdata, tmp, &unreg_list, list) {
bool netdev = sdata->dev;

@@ -2307,7 +2309,6 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
if (!netdev)
kfree(sdata);
}
- wiphy_unlock(local->hw.wiphy);
}

static int netdev_notify(struct notifier_block *nb,
--
2.34.1