This is a note to let you know that I've just added the patch titled RDMA/mlx5: Fix xlt_chunk_align calculation to the 5.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: rdma-mlx5-fix-xlt_chunk_align-calculation.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From f4c6f31011eafe027abddf6cee1288a1b5a05b73 Mon Sep 17 00:00:00 2001 From: Niklas Schnelle <schnelle@xxxxxxxxxxxxx> Date: Wed, 8 Sep 2021 10:18:49 +0200 Subject: RDMA/mlx5: Fix xlt_chunk_align calculation From: Niklas Schnelle <schnelle@xxxxxxxxxxxxx> commit f4c6f31011eafe027abddf6cee1288a1b5a05b73 upstream. The XLT chunk alignment depends on ent_size not sizeof(ent_size) aka sizeof(size_t). The incoming ent_size is either 8 or 16, so the miscalculation when 16 is required is only an over-alignment and functional harmless. Fixes: 8010d74b9965 ("RDMA/mlx5: Split the WR setup out of mlx5_ib_update_xlt()") Link: https://lore.kernel.org/r/20210908081849.7948-2-schnelle@xxxxxxxxxxxxx Signed-off-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -995,7 +995,7 @@ static struct mlx5_ib_mr *alloc_cacheabl static void *mlx5_ib_alloc_xlt(size_t *nents, size_t ent_size, gfp_t gfp_mask) { const size_t xlt_chunk_align = - MLX5_UMR_MTT_ALIGNMENT / sizeof(ent_size); + MLX5_UMR_MTT_ALIGNMENT / ent_size; size_t size; void *res = NULL; Patches currently in stable-queue which might be from schnelle@xxxxxxxxxxxxx are queue-5.14/rdma-mlx5-fix-xlt_chunk_align-calculation.patch