lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAG=2xmM_AyOmvDbuAi7CmgGDhtYkDDe_kmFG_iAc11JqnbHhuA@mail.gmail.com>
Date: Tue, 16 Dec 2025 11:59:58 +0000
From: Adrián Moreno <amorenoz@...hat.com>
To: Vladimir Shebordaev <vladimir.shebordaev@...il.com>
Cc: Aaron Conole <aconole@...hat.com>, Toke Høiland-Jørgensen <toke@...hat.com>, 
	Eelco Chaudron <echaudro@...hat.com>, Ilya Maximets <i.maximets@....org>, 
	Alexei Starovoitov <ast@...nel.org>, Jesse Gross <jesse@...ira.com>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, 
	netdev@...r.kernel.org, dev@...nvswitch.org
Subject: Re: [PATCH v2] net: openvswitch: Avoid needlessly taking the RTNL on
 vport destroy

On Tue, Dec 16, 2025 at 04:31:14AM +0300, Vladimir Shebordaev wrote:
> Perhaps, ovs_netdev_tunnel_destroy() is also worth to be modified this way.
> It is invoked as a vport destructor in similar code paths and even has a
> nice comment about its double duty.
>

In this case OVS owns the underlying tunnel device so it's less likely
that someone will delete it by other means. Still, I think you're
right and we could spare one RTNL lock in such case.

We can fix this in an independent patch so that Fixes points to the
right commit.

Thanks.
Adrián

> --
> Regards,
> Vladimir
>
>
> On Mon, Dec 15, 2025 at 4:16 PM Aaron Conole <aconole@...hat.com> wrote:
>
> > Toke Høiland-Jørgensen <toke@...hat.com> writes:
> >
> > > The openvswitch teardown code will immediately call
> > > ovs_netdev_detach_dev() in response to a NETDEV_UNREGISTER notification.
> > > It will then start the dp_notify_work workqueue, which will later end up
> > > calling the vport destroy() callback. This callback takes the RTNL to do
> > > another ovs_netdev_detach_port(), which in this case is unnecessary.
> > > This causes extra pressure on the RTNL, in some cases leading to
> > > "unregister_netdevice: waiting for XX to become free" warnings on
> > > teardown.
> > >
> > > We can straight-forwardly avoid the extra RTNL lock acquisition by
> > > checking the device flags before taking the lock, and skip the locking
> > > altogether if the IFF_OVS_DATAPATH flag has already been unset.
> > >
> > > Fixes: b07c26511e94 ("openvswitch: fix vport-netdev unregister")
> > > Tested-by: Adrian Moreno <amorenoz@...hat.com>
> > > Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> > > ---
> >
> > LGTM,
> >
> > Acked-by: Aaron Conole <aconole@...hat.com>
> >
> >
> >


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ