From: Kuniyuki Iwashima <kuniyu@google.com>
To: alhouseenyousef@gmail.com
Cc: alex.aring@gmail.com, davem@davemloft.net, edumazet@google.com,
horms@kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org,
linux-wpan@vger.kernel.org, marcel@holtmann.org,
miquel.raynal@bootlin.com, netdev@vger.kernel.org,
pabeni@redhat.com, stable@vger.kernel.org,
stefan@datenfreihafen.org,
syzbot+36256deb69a588e9290e@syzkaller.appspotmail.com
Subject: Re: [PATCH net] mac802154: wait for RCU readers when removing interfaces
Date: Tue, 30 Jun 2026 21:46:38 +0000 [thread overview]
Message-ID: <20260630214737.3387996-1-kuniyu@google.com> (raw)
In-Reply-To: <20260630211808.50440-1-alhouseenyousef@gmail.com>
From: Yousef Alhouseen <alhouseenyousef@gmail.com>
Date: Tue, 30 Jun 2026 23:18:08 +0200
> Queue wake, stop, and disable paths walk local->interfaces under RCU.
> The bulk hardware teardown path removes entries with list_del() and
The problematic part is list_del(), not unregister_netdevice().
> immediately unregisters their netdevices, so an asynchronous transmit
not immediately, unregister_netdevice() waits inflight RCU readers.
So, synchronize_rcu() should be unnecessary.
(Same remark for ieee802154_if_remove())
> 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);
> }
> --
next prev parent reply other threads:[~2026-06-30 21:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 21:18 [PATCH net] mac802154: wait for RCU readers when removing interfaces Yousef Alhouseen
2026-06-30 21:46 ` Kuniyuki Iwashima [this message]
2026-07-01 16:42 ` [PATCH net v2] mac802154: remove interfaces with RCU list deletion Yousef Alhouseen
2026-07-01 21:49 ` Kuniyuki Iwashima
2026-07-03 10:57 ` Miquel Raynal
2026-07-03 14:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260630214737.3387996-1-kuniyu@google.com \
--to=kuniyu@google.com \
--cc=alex.aring@gmail.com \
--cc=alhouseenyousef@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=stefan@datenfreihafen.org \
--cc=syzbot+36256deb69a588e9290e@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.