[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <173693956967.5893.6870114019136382998@kwain>
Date: Wed, 15 Jan 2025 12:12:49 +0100
From: Antoine Tenart <atenart@...nel.org>
To: Edward Cree <ecree.xilinx@...il.com>, Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: avoid race between device unregistration and set_channels
Quoting Edward Cree (2025-01-15 12:04:58)
> On 15/01/2025 09:41, Antoine Tenart wrote:
> > Quoting Edward Cree (2025-01-15 03:51:12)
> >> Would __dev_ethtool() need a similar check?
> >
> > It doesn't because it calls __dev_get_by_name() and returns -ENODEV in
> > case dismantle started.
> >
> So, to check I'm understanding correctly - this is because
> ethnl_default_set_doit() calls ethnl_parse_header_dev_get()
> before it takes rtnl, whereas ethtool takes rtnl before it
> calls __dev_get_by_name()?
> Subtle enough difference that the commit message should
> probably explain it.
That's right, and because unlist_netdevice is called from
unregister_netdevice_many_notify. I can add the explanation in the
commit log.
Thanks,
Antoine
Powered by blists - more mailing lists