[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250327143741.3851f943@kernel.org>
Date: Thu, 27 Mar 2025 14:37:41 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Stanislav Fomichev <stfomichev@...il.com>
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 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?
Powered by blists - more mailing lists