hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/ethernet/mellanox/mlx5/core/health.c
....@@ -618,6 +618,13 @@
618618 priv = container_of(health, struct mlx5_priv, health);
619619 dev = container_of(priv, struct mlx5_core_dev, priv);
620620
621
+ mutex_lock(&dev->intf_state_mutex);
622
+ if (test_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags)) {
623
+ mlx5_core_err(dev, "health works are not permitted at this stage\n");
624
+ mutex_unlock(&dev->intf_state_mutex);
625
+ return;
626
+ }
627
+ mutex_unlock(&dev->intf_state_mutex);
621628 enter_error_state(dev, false);
622629 if (IS_ERR_OR_NULL(health->fw_fatal_reporter)) {
623630 if (mlx5_health_try_recover(dev))