Patch "net/mlx5: Fix crash during sync firmware reset" has been added to the 6.0-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: Fix crash during sync firmware reset

to the 6.0-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-fix-crash-during-sync-firmware-reset.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 8d709329fc94c985b98389a09e1a316d349b6067
Author: Suresh Devarakonda <ramad@xxxxxxxxxx>
Date:   Wed Oct 26 14:51:49 2022 +0100

    net/mlx5: Fix crash during sync firmware reset
    
    [ Upstream commit aefb62a9988749703435e941704624949a80a2a9 ]
    
    When setting Bluefield to DPU NIC mode using mlxconfig tool +  sync
    firmware reset flow, we run into scenario where the host was not
    eswitch manager at the time of mlx5 driver load but becomes eswitch manager
    after the sync firmware reset flow. This results in null pointer
    access of mpfs structure during mac filter add. This change prevents null
    pointer access but mpfs table entries will not be added.
    
    Fixes: 5ec697446f46 ("net/mlx5: Add support for devlink reload action fw activate")
    Signed-off-by: Suresh Devarakonda <ramad@xxxxxxxxxx>
    Reviewed-by: Moshe Shemesh <moshe@xxxxxxxxxx>
    Reviewed-by: Bodong Wang <bodong@xxxxxxxxxx>
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221026135153.154807-12-saeed@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c
index 839a01da110f..8ff16318e32d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c
@@ -122,7 +122,7 @@ void mlx5_mpfs_cleanup(struct mlx5_core_dev *dev)
 {
 	struct mlx5_mpfs *mpfs = dev->priv.mpfs;
 
-	if (!MLX5_ESWITCH_MANAGER(dev))
+	if (!mpfs)
 		return;
 
 	WARN_ON(!hlist_empty(mpfs->hash));
@@ -137,7 +137,7 @@ int mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u8 *mac)
 	int err = 0;
 	u32 index;
 
-	if (!MLX5_ESWITCH_MANAGER(dev))
+	if (!mpfs)
 		return 0;
 
 	mutex_lock(&mpfs->lock);
@@ -185,7 +185,7 @@ int mlx5_mpfs_del_mac(struct mlx5_core_dev *dev, u8 *mac)
 	int err = 0;
 	u32 index;
 
-	if (!MLX5_ESWITCH_MANAGER(dev))
+	if (!mpfs)
 		return 0;
 
 	mutex_lock(&mpfs->lock);



[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