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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-a523ukeu0uz27l@mini-arch>
Date: Fri, 28 Mar 2025 08:01:47 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Stanislav Fomichev <sdf@...ichev.me>, netdev@...r.kernel.org,
	davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
	Cosmin Ratiu <cratiu@...dia.com>
Subject: Re: [PATCH net v2 03/11] net: use netif_disable_lro in ipv6_add_dev

On 03/27, Jakub Kicinski wrote:
> On Thu, 27 Mar 2025 14:06:43 -0700 Stanislav Fomichev wrote:
> > On 03/27, Jakub Kicinski wrote:
> > > On Thu, 27 Mar 2025 06:56:51 -0700 Stanislav Fomichev wrote:  
> > > > @@ -3151,11 +3153,12 @@ int addrconf_add_ifaddr(struct net *net, void __user *arg)
> > > >  	cfg.plen = ireq.ifr6_prefixlen;
> > > >  
> > > >  	rtnl_net_lock(net);
> > > > -	dev = __dev_get_by_index(net, ireq.ifr6_ifindex);
> > > > +	dev = netdev_get_by_index_lock(net, ireq.ifr6_ifindex);  
> > > 
> > > I think you want ops locking here, no?
> > > netdev_get_by_index_lock() will also lock devs which didn't opt in.  
> > 
> > New netdev_get_by_index_lock_ops? I felt like we already have too many
> > xxxdev_get_by, but agreed that it should be safer, will do!
> 
> I think we're holding rtnl_lock here, so we don't need an 
> "atomic get and lock", we can stick to __dev_get_by_index()
> and then lock it separately?

Sounds good, that should do it, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ