Patch "net/mlx5: Avoid recovery in probe flows" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5: Avoid recovery in probe flows

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5-avoid-recovery-in-probe-flows.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5b4b5d2ed3fa3fe39f274090d5f744c942e203c0
Author: Shay Drory <shayd@xxxxxxxxxx>
Date:   Thu Nov 24 13:34:12 2022 +0200

    net/mlx5: Avoid recovery in probe flows
    
    [ Upstream commit 9078e843efec530f279a155f262793c58b0746bd ]
    
    Currently, recovery is done without considering whether the device is
    still in probe flow.
    This may lead to recovery before device have finished probed
    successfully. e.g.: while mlx5_init_one() is running. Recovery flow is
    using functionality that is loaded only by mlx5_init_one(), and there
    is no point in running recovery without mlx5_init_one() finished
    successfully.
    
    Fix it by waiting for probe flow to finish and checking whether the
    device is probed before trying to perform recovery.
    
    Fixes: 51d138c2610a ("net/mlx5: Fix health error state handling")
    Signed-off-by: Shay Drory <shayd@xxxxxxxxxx>
    Reviewed-by: Moshe Shemesh <moshe@xxxxxxxxxx>
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index 86ed87d704f7..96417c5feed7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -674,6 +674,12 @@ static void mlx5_fw_fatal_reporter_err_work(struct work_struct *work)
 	dev = container_of(priv, struct mlx5_core_dev, priv);
 	devlink = priv_to_devlink(dev);
 
+	mutex_lock(&dev->intf_state_mutex);
+	if (test_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags)) {
+		mlx5_core_err(dev, "health works are not permitted at this stage\n");
+		return;
+	}
+	mutex_unlock(&dev->intf_state_mutex);
 	enter_error_state(dev, false);
 	if (IS_ERR_OR_NULL(health->fw_fatal_reporter)) {
 		devl_lock(devlink);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux