]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix crash during sync firmware reset
authorSuresh Devarakonda <ramad@nvidia.com>
Wed, 26 Oct 2022 13:51:49 +0000 (14:51 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Oct 2022 18:06:56 +0000 (11:06 -0700)
commit214316ae45116a5c36a5af1b57288d208802a9f0
treed11d1ad84ad5591b185257e8d42792da2ee78329
parent95bc2d4f945d53eaf08452a8fda6aa19d10b78c3
net/mlx5: Fix crash during sync firmware reset

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: 49fe18e0e3df ("net/mlx5: Add support for devlink reload action fw activate")
Signed-off-by: Suresh Devarakonda <ramad@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Bodong Wang <bodong@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20221026135153.154807-12-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c