Skip to content

Commit 8115d49

Browse files
hamdanigbariaBrian Maly
authored and
Brian Maly
committed
RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation
The mutex was not unlocked on some of the error flows. Moved the unlock location to include all the error flow scenarios. Fixes: e1f4a52 ("RDMA/mlx5: Create an indirect flow table for steering anchor") Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com> Link: https://lore.kernel.org/r/1244a69d783da997c0af0b827c622eb00495492e.1695203958.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org> Orabug: 36385281 (cherry picked from commit 2fad8f0) cherry-pick-repo=kernel/git/torvalds/linux.git unmodified-from-upstream: 2fad8f0 Signed-off-by: Mikhael Goikhman <migo@nvidia.com> Signed-off-by: Qing Huang <qing.huang@oracle.com> Reviewed-by: Devesh Sharma <devesh.s.sharma@oracle.com> Signed-off-by: Brian Maly <brian.maly@oracle.com>
1 parent 5db7335 commit 8115d49

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2530,8 +2530,8 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_STEERING_ANCHOR_CREATE)(
25302530
mlx5_steering_anchor_destroy_res(ft_prio);
25312531
put_flow_table:
25322532
put_flow_table(dev, ft_prio, true);
2533-
mutex_unlock(&dev->flow_db->lock);
25342533
free_obj:
2534+
mutex_unlock(&dev->flow_db->lock);
25352535
kfree(obj);
25362536

25372537
return err;

0 commit comments

Comments
 (0)