Re: [PATCH net] net/mlx5e: Stop asserting for RTNL when closing channels
From: Stanislav Fomichev
Date: Tue Oct 20 2026 - 18:00:23 EST
On 10/20, Tariq Toukan wrote:
> From: Cosmin Ratiu <cratiu@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Reviewed-by: Carolina Jubran <cjubran@xxxxxxxxxx>
> Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxxx>