Skip to content

Commit

Permalink
net/mlx5e: Fix crash in recovery flow without devlink reporter
Browse files Browse the repository at this point in the history
When health reporters are not supported, recovery function is invoked
directly, not via devlink health reporters.

In this direct flow, the recover function input parameter was passed
incorrectly and is causing a kernel oops. This patch is fixing the input
parameter.

Following call trace is observed on rx error health reporting.

Internal error: Oops: 96000007 [#1] PREEMPT SMP
Process kworker/u16:4 (pid: 4584, stack limit = 0x00000000c9e45703)
Call trace:
mlx5e_rx_reporter_err_rq_cqe_recover+0x30/0x164 [mlx5_core]
mlx5e_health_report+0x60/0x6c [mlx5_core]
mlx5e_reporter_rq_cqe_err+0x6c/0x90 [mlx5_core]
mlx5e_rq_err_cqe_work+0x20/0x2c [mlx5_core]
process_one_work+0x168/0x3d0
worker_thread+0x58/0x3d0
kthread+0x108/0x134

Fixes: c50de4a ("net/mlx5e: Generalize tx reporter's functionality")
Signed-off-by: Aya Levin <[email protected]>
Signed-off-by: Parav Pandit <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
  • Loading branch information
ayalevin123 authored and Saeed Mahameed committed Feb 19, 2020
1 parent 5ee090e commit 1ad6c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en/health.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ int mlx5e_health_report(struct mlx5e_priv *priv,
netdev_err(priv->netdev, err_str);

if (!reporter)
return err_ctx->recover(&err_ctx->ctx);
return err_ctx->recover(err_ctx->ctx);

return devlink_health_report(reporter, err_str, err_ctx);
}

0 comments on commit 1ad6c43

Please sign in to comment.