Netdev List
 help / color / mirror / Atom feed
* [PATCH net] mac802154: wait for RCU readers when removing interfaces
@ 2026-06-30 21:18 Yousef Alhouseen
  2026-06-30 21:46 ` Kuniyuki Iwashima
  2026-07-01 16:42 ` [PATCH net v2] mac802154: remove interfaces with RCU list deletion Yousef Alhouseen
  0 siblings, 2 replies; 4+ messages in thread
From: Yousef Alhouseen @ 2026-06-30 21:18 UTC (permalink / raw)
  To: Alexander Aring, Stefan Schmidt, Miquel Raynal
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Marcel Holtmann, linux-wpan, netdev, linux-kernel,
	stable, syzbot+36256deb69a588e9290e, Yousef Alhouseen

Queue wake, stop, and disable paths walk local->interfaces under RCU.
The bulk hardware teardown path removes entries with list_del() and
immediately unregisters their netdevices, so an asynchronous transmit
completion can follow a poisoned list node in ieee802154_wake_queue().

Match ieee802154_if_remove(): use list_del_rcu() and wait for existing
readers before unregistering each interface.

Fixes: 592dfbfc72f5 ("mac820154: move interface unregistration into iface")
Reported-by: syzbot+36256deb69a588e9290e@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=36256deb69a588e9290e
Cc: stable@vger.kernel.org
Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com>
---
 net/mac802154/iface.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 000be60d9580..73d82a015184 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -703,7 +703,8 @@ void ieee802154_remove_interfaces(struct ieee802154_local *local)
 
 	mutex_lock(&local->iflist_mtx);
 	list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
-		list_del(&sdata->list);
+		list_del_rcu(&sdata->list);
+		synchronize_rcu();
 
 		unregister_netdevice(sdata->dev);
 	}
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-01 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-30 21:18 [PATCH net] mac802154: wait for RCU readers when removing interfaces Yousef Alhouseen
2026-06-30 21:46 ` Kuniyuki Iwashima
2026-07-01 16:42 ` [PATCH net v2] mac802154: remove interfaces with RCU list deletion Yousef Alhouseen
2026-07-01 21:49   ` Kuniyuki Iwashima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox