Skip to content

Commit

Permalink
RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor crea…
Browse files Browse the repository at this point in the history
…tion

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 <[email protected]>
Signed-off-by: Hamdan Igbaria <[email protected]>
Link: https://lore.kernel.org/r/1244a69d783da997c0af0b827c622eb00495492e.1695203958.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <[email protected]>

Orabug: 36385281

(cherry picked from commit 2fad8f0)
cherry-pick-repo=kernel/git/torvalds/linux.git
unmodified-from-upstream: 2fad8f0

Signed-off-by: Mikhael Goikhman <[email protected]>
Signed-off-by: Qing Huang <[email protected]>
Reviewed-by: Devesh Sharma <[email protected]>
Signed-off-by: Brian Maly <[email protected]>
  • Loading branch information
hamdanigbaria authored and Brian Maly committed Jun 5, 2024
1 parent 0464a6a commit 7d3d663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/mlx5/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2530,8 +2530,8 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_STEERING_ANCHOR_CREATE)(
mlx5_steering_anchor_destroy_res(ft_prio);
put_flow_table:
put_flow_table(dev, ft_prio, true);
mutex_unlock(&dev->flow_db->lock);
free_obj:
mutex_unlock(&dev->flow_db->lock);
kfree(obj);

return err;
Expand Down

0 comments on commit 7d3d663

Please sign in to comment.