Skip to content

Commit 74806f7

Browse files
dtatuleaNipaLocal
authored andcommitted
net/mlx5e: Take state lock during tx timeout reporter
mlx5e_safe_reopen_channels() requires the state lock taken. The referenced changed in the Fixes tag removed the lock to fix another issue. This patch adds it back but at a later point (when calling mlx5e_safe_reopen_channels()) to avoid the deadlock referenced in the Fixes tag. Fixes: eab0da3 ("net/mlx5e: Fix possible deadlock on mlx5e_tx_timeout_work") Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Link: https://lore.kernel.org/all/ZplpKq8FKi3vwfxv@gmail.com/T/ Reviewed-by: Breno Leitao <leitao@debian.org> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: NipaLocal <nipa@local>
1 parent 3a3ff18 commit 74806f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ static int mlx5e_tx_reporter_timeout_recover(void *ctx)
146146
return err;
147147
}
148148

149+
mutex_lock(&priv->state_lock);
149150
err = mlx5e_safe_reopen_channels(priv);
151+
mutex_unlock(&priv->state_lock);
150152
if (!err) {
151153
to_ctx->status = 1; /* all channels recovered */
152154
return err;

0 commit comments

Comments
 (0)