Commit 2fad8f06 authored by Hamdan Igbaria's avatar Hamdan Igbaria Committed by Leon Romanovsky

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: e1f4a52a ("RDMA/mlx5: Create an indirect flow table for steering anchor")
Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
Signed-off-by: default avatarHamdan Igbaria <hamdani@nvidia.com>
Link: https://lore.kernel.org/r/1244a69d783da997c0af0b827c622eb00495492e.1695203958.git.leonro@nvidia.comSigned-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 4f14c6c0
......@@ -2470,8 +2470,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment