diff options
| author | Michael Guralnik <michaelgur@nvidia.com> | 2026-06-10 03:01:43 +0300 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@nvidia.com> | 2026-06-11 15:36:09 -0300 |
| commit | 8c76126b866649d8e8acc09a06f2b03b6ff88900 (patch) | |
| tree | ef4d3593ca1ccbb43719f0b444b850a0ff14202a /include/rdma | |
| parent | 3937243095b5cfed6556bd1ea170790223f3eeb0 (diff) | |
| download | linux-next-8c76126b866649d8e8acc09a06f2b03b6ff88900.tar.gz linux-next-8c76126b866649d8e8acc09a06f2b03b6ff88900.zip | |
RDMA/core: Fix FRMR handle leak on push failure
Failure to push a handle to the pool, caused by ENOMEM on queue page
allocation, will trigger missing in_use counter update, skewing pool
state indefinitely.
Fix that by moving the handling of handle destruction in such case
into the FRMR code, ensuring the handle is either pushed to the pool
or destroyed inside the same function.
Adjust mlx5_ib call site accordingly.
Fixes: ce5df0b891ed ("IB/core: Introduce FRMR pools")
Link: https://patch.msgid.link/r/20260610000145.820592-8-michaelgur@nvidia.com
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/rdma')
| -rw-r--r-- | include/rdma/frmr_pools.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rdma/frmr_pools.h b/include/rdma/frmr_pools.h index af1b88801fa4..5b57bafa3636 100644 --- a/include/rdma/frmr_pools.h +++ b/include/rdma/frmr_pools.h @@ -34,6 +34,6 @@ int ib_frmr_pools_init(struct ib_device *device, const struct ib_frmr_pool_ops *pool_ops); void ib_frmr_pools_cleanup(struct ib_device *device); int ib_frmr_pool_pop(struct ib_device *device, struct ib_mr *mr); -int ib_frmr_pool_push(struct ib_device *device, struct ib_mr *mr); +void ib_frmr_pool_push(struct ib_device *device, struct ib_mr *mr); #endif /* FRMR_POOLS_H */ |
