RDMA/mlx5: Make sure that UMR page is aligned to PAGE_SIZE

The UMR XLT buffer needs to be aligned to PAGE_SIZE.

Fixes: b2022068de ("RDMA/mlx5: use kmalloc() for UMR translation buffers")
Link: https://patch.msgid.link/20260722-fix-get-order-alignment-v1-1-ece212ddb5dc@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
This commit is contained in:
Leon Romanovsky 2026-07-27 02:22:01 -04:00
parent a273210687
commit c715007b21

View File

@ -518,7 +518,7 @@ static void *mlx5r_umr_alloc_xlt(size_t *nents, size_t ent_size, gfp_t gfp_mask)
size = min_t(size_t, ent_size * ALIGN(*nents, xlt_chunk_align),
MLX5_MAX_UMR_CHUNK);
*nents = size / ent_size;
res = kmalloc(size, gfp_mask | __GFP_NOWARN);
res = kmalloc(PAGE_ALIGN(size), gfp_mask | __GFP_NOWARN);
if (res)
return res;