From: Stanislav Fomichev <stfomichev@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Stanislav Fomichev <sdf@fomichev.me>,
netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org, horms@kernel.org, corbet@lwn.net,
andrew+netdev@lunn.ch, pablo@netfilter.org, kadlec@netfilter.org
Subject: Re: [PATCH net-next] net: revert to lockless TC_SETUP_BLOCK and TC_SETUP_FT
Date: Sat, 8 Mar 2025 09:08:52 -0800 [thread overview]
Message-ID: <Z8x5pI0suqOiZPId@mini-arch> (raw)
In-Reply-To: <CANn89iLV6mLh8mWhYket7gBWTX+3TcCrJDA4EU5YU4ebV2nPYw@mail.gmail.com>
On 03/08, Eric Dumazet wrote:
> On Sat, Mar 8, 2025 at 5:47 AM Stanislav Fomichev <sdf@fomichev.me> wrote:
> >
> > There is a couple of places from which we can arrive to ndo_setup_tc
> > with TC_SETUP_BLOCK/TC_SETUP_FT:
> > - netlink
> > - netlink notifier
> > - netdev notifier
> >
> > Locking netdev too deep in this call chain seems to be problematic
> > (especially assuming some/all of the call_netdevice_notifiers
> > NETDEV_UNREGISTER) might soon be running with the instance lock).
> > Revert to lockless ndo_setup_tc for TC_SETUP_BLOCK/TC_SETUP_FT. NFT
> > framework already takes care of most of the locking. Document
> > the assumptions.
> >
>
>
> >
> > Fixes: c4f0f30b424e ("net: hold netdev instance lock during nft ndo_setup_tc")
> > Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
>
> I think you forgot to mention syzbot.
>
> Reported-by: syzbot+0afb4bcf91e5a1afdcad@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/netdev/67cb88d1.050a0220.d8275.022d.GAE@google.com/T/#u
Ah, yes, I was waiting for a repro, but should have attached the proper
tags, thanks!
next prev parent reply other threads:[~2025-03-08 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-08 4:47 [PATCH net-next] net: revert to lockless TC_SETUP_BLOCK and TC_SETUP_FT Stanislav Fomichev
2025-03-08 6:41 ` Eric Dumazet
2025-03-08 17:08 ` Stanislav Fomichev [this message]
2025-03-12 12:43 ` Simon Horman
2025-03-12 20: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=Z8x5pI0suqOiZPId@mini-arch \
--to=stfomichev@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=sdf@fomichev.me \
/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;
as well as URLs for NNTP newsgroup(s).