mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] net/mlx5e: Stop asserting for RTNL when closing channels
@ 2026-10-20 15:36 Tariq Toukan
  2026-10-20 21:57 ` Stanislav Fomichev
  0 siblings, 1 reply; 2+ messages in thread
From: Tariq Toukan @ 2026-10-20 15:36 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni
  Cc: Carolina Jubran, Cosmin Ratiu, Dragos Tatulea, Gal Pressman,
	Leon Romanovsky, open list, linux-rdma, Mark Bloch,
	Saeed Mahameed, Tariq Toukan

From: Cosmin Ratiu <cratiu@nvidia.com>

mlx5e_close_channels() has an ASSERT_RTNL() from the time when RTNL was
required for closing channels.
But the driver has been switched to using the netdev lock a while back,
and this fired from a flow which was forgotten during the conversion:

mlx5e_tx_timeout_work()
  -> mlx5e_reporter_tx_timeout()
  -> mlx5e_health_report()
  -> mlx5e_tx_reporter_timeout_recover()
  -> mlx5e_safe_reopen_channels()
  -> mlx5e_safe_switch_params()
  -> mlx5e_close_channels()

The RTNL is not acquired here, but the netdev lock is, and it is enough.

Rather than switching to netdev_assert_locked(), simply drop the assert.
Upper layers (networking core, ethtool core) provide locking and lower
layers (NAPI helpers) assert that the netdev lock is held.

Fixes: 8f7b00307bf1 ("net/mlx5e: Convert mlx5 netdevs to instance locking")
Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 4c6060d54fbe..38ce7d0a9001 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3075,7 +3075,6 @@ void mlx5e_close_channels(struct mlx5e_channels *chs)
 {
 	int i;
 
-	ASSERT_RTNL();
 	if (chs->ptp) {
 		mlx5e_ptp_close(chs->ptp);
 		chs->ptp = NULL;

base-commit: b6ef0d965fe8ce0ee4b4dcb58b3511f83003e42d
-- 
2.44.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-20 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-20 15:36 [PATCH net] net/mlx5e: Stop asserting for RTNL when closing channels Tariq Toukan
2026-10-20 21:57 ` Stanislav Fomichev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®