Re: [PATCH net] net: ethtool: keep rtnl_lock for ops using ethtool_op_get_link()
Breno Leitao <[email protected]>
| Newsgroups | org.kernel.vger.linux-hyperv,org.kernel.vger.linux-rdma,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 25, 2026 at 08:48:03AM -0700, Stanislav Fomichev wrote: > On 06/24, Jakub Kicinski wrote: > > Breno reports following splats on mlx5: > > > > RTNL: assertion failed at net/core/dev.c (2241) > > WARNING: net/core/dev.c:2241 at netif_state_change+0xed/0x130, CPU#5: ethtool/1335 > > RIP: 0010:netif_state_change+0xf9/0x130 > > Call Trace: > > <TASK> > > __linkwatch_sync_dev+0xea/0x120 > > ethtool_op_get_link+0xe/0x20 > > __ethtool_get_link+0x26/0x40 > > linkstate_prepare_data+0x51/0x200 > > ethnl_default_doit+0x213/0x470 > > genl_family_rcv_msg_doit+0xdd/0x110 > > > > Looks like I missed ethtool_op_get_link() trying to sync linkwatch, > > which needs rtnl_lock. Not all drivers do this - bnxt doesn't, > > it just returns the link state, so add an opt-in bit. > > > > Reported-by: Breno Leitao <[email protected]> > > Fixes: 45079e00133e ("net: ethtool: optionally skip rtnl_lock on Netlink path for GET ops") > > Signed-off-by: Jakub Kicinski <[email protected]> > > Acked-by: Stanislav Fomichev <[email protected]> Reviewed-by: Breno Leitao <[email protected]>