]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/mlx5: Release the HW‑provided UAR index rather than the SW one
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 11 Jun 2026 10:20:15 +0000 (13:20 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 11 Jun 2026 19:18:15 +0000 (16:18 -0300)
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>
drivers/infiniband/hw/mlx5/main.c

index 38b2481aaae188938b8061b309d96c834f85fe2d..02809114fc79afe7526b4c6ebd3e8580c636fcba 100644 (file)
@@ -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);