From f0874ea680e31819ca4028e3760eaf5a5959621a Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Wed, 27 Sep 2023 20:09:03 -0400 Subject: [PATCH] EX-8245 ptlrpc: always do vmalloc If we were ever to do an allocation with kmalloc, we could get non-page aligned memory. So just use vmalloc directly. Sadly, this isn't the problem with infiniband. We never ask for < 8192, which is the libcfs kmalloc/vmalloc cutoff. Still, this is a timebomb if we ever changed the libcfs kmalloc/vmalloc cutoff, so, fix it. Signed-off-by: Patrick Farrell Change-Id: Id20898065b516d363d9dc280e71be1b5cfb6f4a7 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52532 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/ptlrpc/sec_bulk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ptlrpc/sec_bulk.c b/lustre/ptlrpc/sec_bulk.c index a413cab..9ec2d56 100644 --- a/lustre/ptlrpc/sec_bulk.c +++ b/lustre/ptlrpc/sec_bulk.c @@ -557,7 +557,7 @@ static int pool_add_pages(int npages, struct ptlrpc_page_pool *page_pool) ptr_pages[i][j] = alloc_page(GFP_NOFS | __GFP_HIGHMEM); else { - OBD_ALLOC_LARGE(ptr_pages[i][j], + OBD_VMALLOC(ptr_pages[i][j], element_size(page_pool)); } if (ptr_pages[i][j] == NULL) -- 1.8.3.1