summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2026-06-11 13:20:15 +0300
committerJason Gunthorpe <jgg@nvidia.com>2026-06-11 16:18:15 -0300
commit449ae7927152e46acbe5f19f97eafdae6d3a96b1 (patch)
tree706d51523d3cf07e915f89f520e053a766fda551
parentd881d60223aac8fdc12b227d89c76e131e92a9cd (diff)
downloadlinux-449ae7927152e46acbe5f19f97eafdae6d3a96b1.tar.gz
linux-449ae7927152e46acbe5f19f97eafdae6d3a96b1.zip
RDMA/mlx5: Release the HW‑provided UAR index rather than the SW one
Free the UAR index returned by the hardware. Fixes: 4ed131d0bb15 ("IB/mlx5: Expose dynamic mmap allocation") Link: https://patch.msgid.link/r/20260611-fix-uar-release-v1-1-f5464d845dbf@nvidia.com Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
-rw-r--r--drivers/infiniband/hw/mlx5/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 38b2481aaae1..02809114fc79 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -2683,7 +2683,7 @@ err:
if (!dyn_uar)
return err;
- mlx5_cmd_uar_dealloc(dev->mdev, idx, context->devx_uid);
+ mlx5_cmd_uar_dealloc(dev->mdev, uar_index, context->devx_uid);
free_bfreg:
mlx5_ib_free_bfreg(dev, bfregi, bfreg_dyn_idx);