mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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:
parent
a273210687
commit
c715007b21
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user