]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Nullify table pointer when failing to create
authorAya Levin <ayal@nvidia.com>
Sun, 12 Mar 2023 14:37:36 +0000 (16:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:26 +0000 (23:03 +0900)
commit0235f867e1df34a8196f4c52c8bf9c8726514732
treedfba72a01efbac40fc4b44ee60e6306032d33822
parentc269d2c8863ef10a589caf97b39e5d33b4e78617
net/mlx5e: Nullify table pointer when failing to create

[ Upstream commit 1b540decd03acd736693aabb6cb46c71fca38ae6 ]

On failing to create promisc flow steering table, the pointer is
returned with an error. Nullify it so unloading the driver won't try to
destroy a non existing table.

Failing to create promisc table may happen over BF devices when the ARM
side is going through a firmware tear down. The host side start a
reload flow. While the driver unloads, it tries to remove the promisc
table. Remove WARN in this state as it is a valid error flow.

Fixes: 39d9e145352f ("net/mlx5e: Optimize promiscuous mode")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c