From: Nikolay Aleksandrov <razor@blackwall.org>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: idosch@nvidia.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, horms@kernel.org, tobias@waldekranz.com,
bridge@lists.linux.dev
Subject: Re: [PATCH net] net: bridge: mst: move switchdev call outside rcu
Date: Tue, 15 Sep 2026 13:26:17 +0300 [thread overview]
Message-ID: <aa5eba0c-b9ea-4b7f-a529-54980081e259@blackwall.org> (raw)
In-Reply-To: <b696c600-4ab1-41d5-b391-3f6373200cd8@blackwall.org>
On 15/09/2026 13:25, Nikolay Aleksandrov wrote:
> On 15/09/2026 13:23, Paolo Abeni wrote:
>> On 9/11/26 12:50 PM, Nikolay Aleksandrov wrote:
>>> This is a follow-up of one of sashiko's pre-existing bug reports.
>>> br_mst_set_state() calls switchdev_port_attr_set() for nonzero MSTIs
>>> while holding rcu_read_lock() which invokes the blocking switchdev
>>> notifier chain and may sleep. Nonzero MSTI changes come from netlink
>>> with rtnl held. Move the switchdev call before entering the rcu section and
>>> assert that rtnl is held.
>>>
>>> The call cannot be deferred because netlink needs its error and extack.
>>> Also DSA reads the old bridge MST state during the callback and checks it.
>>> A deferred callback will be late and will see the updated state.
>>>
>>> Fixes: 7ae9147f4312 ("net: bridge: mst: Notify switchdev drivers of MST state changes")
>>> Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
>> Clashiko noted that the fixes tag looks inaccurate, should be:
>>
>> Fixes: 3a7c1661ae1383 ("net: bridge: mst: fix vlan use-after-free")
>>
>> do you agree? I can fix the tag while applying the patch no need to repost.
>>
>> /P
>>
>
> Yeah, I agree. As Ido also noted, that is the correct commit id but it is
> from the same set. :)
err, I meant same release
> Thank you for taking care of this.
next prev parent reply other threads:[~2026-09-15 10:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 10:50 [PATCH net] net: bridge: mst: move switchdev call outside rcu Nikolay Aleksandrov
2026-09-14 6:15 ` Ido Schimmel
2026-09-15 10:23 ` Paolo Abeni
2026-09-15 10:25 ` Nikolay Aleksandrov
2026-09-15 10:26 ` Nikolay Aleksandrov [this message]
2026-09-15 10:30 ` 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=aa5eba0c-b9ea-4b7f-a529-54980081e259@blackwall.org \
--to=razor@blackwall.org \
--cc=bridge@lists.linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tobias@waldekranz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox