From: Stanislav Fomichev <stfomichev@gmail.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Jakub Kicinski <kuba@kernel.org>,
Network Development <netdev@vger.kernel.org>,
Jiri Pirko <jiri@resnulli.us>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Hillf Danton <hdanton@sina.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [PATCH net] team: replace team lock with rtnl lock
Date: Fri, 20 Jun 2025 16:20:42 -0700 [thread overview]
Message-ID: <aFXsyoJ1ZIULrC3w@mini-arch> (raw)
In-Reply-To: <ae7e9800-e395-4b9e-9878-83a5e768cc98@I-love.SAKURA.ne.jp>
On 05/22, Tetsuo Handa wrote:
> On 2025/05/22 10:00, Tetsuo Handa wrote:
> > On 2025/05/22 3:00, Jakub Kicinski wrote:
> >> And as he pointed out this patch promptly generates all sort
> >> of locking warnings, please test this properly.
> >
> > I didn't get any compile-time warnings, and
> > https://lkml.kernel.org/r/682e6b1f.a00a0220.2a3337.0007.GAE@google.com didn't
> > get any run-time locking warnings.
> >
> > What locking warnings did you get? Is there an automated testing environment
> > (like https://lkml.kernel.org/r/66a4b1a7.050a0220.12c792.8f9e@mx.google.com )
> > which I can use for testing this patch?
> >
>
> Ah, I got which posts you are referring to. I was failing to receive Jiri's mails
> because my spam filter setting was sending mails from .us domain to trash.
> Now I removed the .us entry.
>
>
>
> Jiri Pirko wrote:
> > Sat, May 17, 2025 at 09:32:20AM +0200, penguin-kernel@I-love.SAKURA.ne.jp wrote:
> >
> > [..]
> >
> > >@@ -2319,13 +2301,12 @@ static struct team *team_nl_team_get(struct genl_info *info)
> > > }
> > >
> > > team = netdev_priv(dev);
> > >- mutex_lock(&team->lock);
> > > return team;
> > > }
> >
> >
> > Why do you think this is safe?
> >
> > Rtnl is held only for set doit.
>
> I assumed that the caller already held rtnl lock.
>
> >
> >
> > >
> > > static void team_nl_team_put(struct team *team)
> > > {
> > >- mutex_unlock(&team->lock);
> > >+ ASSERT_RTNL();
> >
> > Did you test this? How? Howcome you didn't hit this assertion?
>
> Tests using syzbot's reproducer did not hit this assertion.
>
> >
> >
> > > dev_put(team->dev);
> > > }
> > >
[..]
> Anyway, we can't remove team lock. Too bad.
I was hoping to see another revision, but just noticed this part. Can
you share more on why we can't remove the team lock? I can try to
give it a stab if you're not planning to send a follow up...
next prev parent reply other threads:[~2025-06-20 23:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 13:38 [PATCH net] team: replace team lock with rtnl lock Tetsuo Handa
2025-05-21 18:00 ` Jakub Kicinski
2025-05-22 1:00 ` Tetsuo Handa
2025-05-22 13:47 ` Tetsuo Handa
2025-06-20 23:20 ` Stanislav Fomichev [this message]
2025-06-21 16:27 ` Tetsuo Handa
2025-05-22 10:04 ` Jiri Pirko
-- strict thread matches above, loose matches on Subject: below --
2025-06-23 15:31 Stanislav Fomichev
2025-06-25 22:50 ` 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=aFXsyoJ1ZIULrC3w@mini-arch \
--to=stfomichev@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hdanton@sina.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=willemdebruijn.kernel@gmail.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.