diff mbox series

[-next] net/mlx5: fix missing mutex_unlock in mlx5_fw_fatal_reporter_err_work()

Message ID 20230105114220.466631-1-yangyingliang@huawei.com (mailing list archive)
State Not Applicable
Headers show
Series [-next] net/mlx5: fix missing mutex_unlock in mlx5_fw_fatal_reporter_err_work() | expand

Commit Message

Yang Yingliang Jan. 5, 2023, 11:42 a.m. UTC
Add missing mutex_unlock() before returning from
mlx5_fw_fatal_reporter_err_work().

Fixes: 9078e843efec ("net/mlx5: Avoid recovery in probe flows")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/health.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Leon Romanovsky Jan. 5, 2023, 1:16 p.m. UTC | #1
On Thu, Jan 05, 2023 at 07:42:20PM +0800, Yang Yingliang wrote:
> Add missing mutex_unlock() before returning from
> mlx5_fw_fatal_reporter_err_work().
> 
> Fixes: 9078e843efec ("net/mlx5: Avoid recovery in probe flows")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/health.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
> index 96417c5feed7..879555ba847d 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
> @@ -677,6 +677,7 @@ static void mlx5_fw_fatal_reporter_err_work(struct work_struct *work)
>  	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");
> +		mutex_unlock(&dev->intf_state_mutex);
>  		return;
>  	}
>  	mutex_unlock(&dev->intf_state_mutex);

Shay is working to rewrite 9078e843efec ("net/mlx5: Avoid recovery in probe flows") completely.

Thanks

> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index 96417c5feed7..879555ba847d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -677,6 +677,7 @@  static void mlx5_fw_fatal_reporter_err_work(struct work_struct *work)
 	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");
+		mutex_unlock(&dev->intf_state_mutex);
 		return;
 	}
 	mutex_unlock(&dev->intf_state_mutex);