]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/mlx5: Fix UMR XLT cleanup on ODP populate failure
authorPrathamesh Deshpande <prathameshdeshpande7@gmail.com>
Sun, 26 Apr 2026 13:23:41 +0000 (14:23 +0100)
committerLeon Romanovsky <leon@kernel.org>
Mon, 18 May 2026 08:58:41 +0000 (04:58 -0400)
commit1eae35b37923cb71b0cb5136d00671440d488b9f
treec2bdf56458290a2fd7e92e229b92aafe1b66e86a
parent7de165740ce8d006cbe80bca9d8207ba05a4cfc5
RDMA/mlx5: Fix UMR XLT cleanup on ODP populate failure

mlx5r_umr_update_xlt() allocates and DMA maps an XLT buffer with
mlx5r_umr_create_xlt(). The buffer is released by the common cleanup path
through mlx5r_umr_unmap_free_xlt().

After mlx5_odp_populate_xlt() became fallible, its error path returned
directly and skipped that cleanup. This leaks the XLT DMA mapping and
buffer. If the emergency XLT page was used, it also leaves
xlt_emergency_page_mutex locked.

Break out of the loop so execution falls through the existing cleanup path.

Fixes: 1efe8c0670d6 ("RDMA/core: Convert UMEM ODP DMA mapping to caching IOVA and page linkage")
Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
Link: https://patch.msgid.link/20260426132356.22264-1-prathameshdeshpande7@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/umr.c