summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHamdan Igbaria <hamdani@nvidia.com>2023-09-20 13:01:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-10 22:03:05 +0200
commitaa727bb7bd5b1d88d37456cd96deb315d6ee42bb (patch)
tree93a9830c3feeec0b1c98fcc6199035eaa68af78c
parent6dd42618ffddd2116aec9778862040e370515961 (diff)
downloadlinux-stable-aa727bb7bd5b1d88d37456cd96deb315d6ee42bb.tar.gz
linux-stable-aa727bb7bd5b1d88d37456cd96deb315d6ee42bb.tar.bz2
linux-stable-aa727bb7bd5b1d88d37456cd96deb315d6ee42bb.zip
RDMA/mlx5: Fix mutex unlocking on error flow for steering anchor creation
commit 2fad8f06a582cd431d398a0b3f9be21d069603ab upstream. The mutex was not unlocked on some of the error flows. Moved the unlock location to include all the error flow scenarios. Fixes: e1f4a52ac171 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/infiniband/hw/mlx5/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c
index 1e419e080b53..520034acf73a 100644
--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -2470,8 +2470,8 @@ destroy_res:
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;