diff options
| author | 2026-10-03 16:57:41 +0530 | |
|---|---|---|
| committer | 2026-10-06 18:45:09 +0200 | |
| commit | a79d7328ba193d759e3a11911e564de58b6d77db (patch) | |
| tree | 58b8c75939339e67a7d6d2cc37be6ce9146b381c /scripts/Makefile.thinlto | |
| parent | wifi: mac80211: fix non-MLD link ID handling (diff) | |
wifi: mac80211: acquire wiphy lock for unlisted sdata teardown
When netdev registration fails or an interface cannot be moved out of a
dying network namespace, the netdev core calls ->ndo_uninit()
(ieee80211_uninit) with RTNL held.
However, ieee80211_uninit() calls ieee80211_teardown_sdata() without
holding wiphy_lock. During teardown, ieee80211_free_keys() invokes
wiphy_delayed_work_cancel(), which triggers a lockdep warning:
WARNING: CPU: 0 PID: 6112 at net/wireless/core.c:1839 wiphy_delayed_work_cancel+0x85/0xb0
...
Call Trace:
ieee80211_free_keys+0x31a/0x3c0 net/mac80211/key.c:380
ieee80211_teardown_sdata+0x2b8/0x10f0 net/mac80211/iface.c:928
ieee80211_uninit+0x3f/0x50 net/mac80211/iface.c:954
rollback_registered_many+0xa5c/0xef0 net/core/dev.c:10065
In the normal deletion path (ieee80211_del_virtual_intf), both RTNL and
wiphy_lock are held when ieee80211_teardown_sdata() runs, and the sdata
is removed from local->interfaces.
Change ieee80211_unlist_sdata() to return a boolean indicating whether the
sdata was present in the list, and acquire wiphy_lock in ieee80211_uninit()
only if the interface is actually being unlisted here.
Reported-by: syzbot+e9cbd080a7801f06cf08@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e9cbd080a7801f06cf08
Tested-by: syzbot+e9cbd080a7801f06cf08@syzkaller.appspotmail.com
Signed-off-by: Raj Ojha <rajojha047@gmail.com>
Link: https://patch.msgid.link/20261003112741.52-1-rajojha047@gmail.com
[dissolve ieee80211_unlist_sdata() to avoid weird locking]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
