net/mlx5: Fix possible deadlock on rule deletion
authorMaor Gottlieb <maorg@nvidia.com>
Mon, 24 Jan 2022 19:25:04 +0000 (21:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2022 10:42:51 +0000 (11:42 +0100)
commit8d617110d78e734a2c79060d8d36b822cb533053
tree9f6c4e666b5f0259168406ff0fffadd0d1af3568
parent1c5912895545038aebce0596209e5c95f4fc8dfb
net/mlx5: Fix possible deadlock on rule deletion

commit b645e57debca846f51b3209907546ea857ddd3f5 upstream.

Add missing call to up_write_ref_node() which releases the semaphore
in case the FTE doesn't have destinations, such in drop rule case.

Fixes: 465e7baab6d9 ("net/mlx5: Fix deletion of duplicate rules")
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c