Skip to content

Commit e63052a

Browse files
kuba-mooSaeed Mahameed
authored and
Saeed Mahameed
committed
mlx5e: add add missing BH locking around napi_schdule()
It's not correct to call napi_schedule() in pure process context. Because we use __raise_softirq_irqoff() we require callers to be in a context which will eventually lead to softirq handling (hardirq, bh disabled, etc.). With code as is users will see: NOHZ tick-stop error: Non-RCU local softirq work is pending, handler Rust-for-Linux#8!!! Fixes: a8dd7ac ("net/mlx5e: Generalize RQ activation") Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 6ff51ab commit e63052a

File tree

1 file changed

+5
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+5
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,13 @@ int mlx5e_open_rq(struct mlx5e_params *params, struct mlx5e_rq_param *param,
889889
void mlx5e_activate_rq(struct mlx5e_rq *rq)
890890
{
891891
set_bit(MLX5E_RQ_STATE_ENABLED, &rq->state);
892-
if (rq->icosq)
892+
if (rq->icosq) {
893893
mlx5e_trigger_irq(rq->icosq);
894-
else
894+
} else {
895+
local_bh_disable();
895896
napi_schedule(rq->cq.napi);
897+
local_bh_enable();
898+
}
896899
}
897900

898901
void mlx5e_deactivate_rq(struct mlx5e_rq *rq)

0 commit comments

Comments
 (0)