]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/mlx5: Drop FRMR pool handle on UMR revoke failure
authorMichael Guralnik <michaelgur@nvidia.com>
Wed, 10 Jun 2026 00:01:45 +0000 (03:01 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 11 Jun 2026 18:36:09 +0000 (15:36 -0300)
commitc37d79dd967d450ea02e0ee2b6438b8534bbd044
tree855341a1f961eeb8bada866987908c74c78277eb
parentddbc251be18fb82884ee6e9af634cc9f1171a4d6
RDMA/mlx5: Drop FRMR pool handle on UMR revoke failure

When UMR revoke fails during MR cleanup, the handle is left in an
unknown state and cannot be returned to the pool. The driver already
destroys the mkey via the fallback path, but the pool's in_use counter
is never decremented, drifting upward over time.

Call ib_frmr_pool_drop on the revoke-failure path so the pool's
accounting stays consistent with the handles it has handed out.

Fixes: 36680ef7bceb ("RDMA/mlx5: Switch from MR cache to FRMR pools")
Link: https://patch.msgid.link/r/20260610000145.820592-10-michaelgur@nvidia.com
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/mr.c