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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250114064538.7f47e587@kernel.org>
Date: Tue, 14 Jan 2025 06:45:38 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, pabeni@...hat.com,
 andrew+netdev@...n.ch, horms@...nel.org, jdamato@...tly.com
Subject: Re: [PATCH net-next 02/11] net: add helpers for lookup and walking
 netdevs under netdev_lock()

On Tue, 14 Jan 2025 14:03:35 +0100 Eric Dumazet wrote:
> > +struct net_device *__netdev_put_lock(struct net_device *dev)
> > +{
> > +       netdev_lock(dev);
> > +       if (dev->reg_state > NETREG_REGISTERED) {  
> 
> I presume the netdev lock will be held at some point in
> netdev_run_todo and/or unregister_netdevice_many_notify
> so no need for a READ_ONCE() here.

Yes, the only unprotected write is in free_netdev(), but we're holding
a reference here so if we get to free there's a bug somewhere else.
I'll reorder patches 2 and 3.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ