From: Patrick Farrell Date: Thu, 28 Sep 2023 00:09:03 +0000 (-0400) Subject: EX-8245 ptlrpc: always do vmalloc X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f0874ea680e31819ca4028e3760eaf5a5959621a;p=fs%2Flustre-release.git 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 --- 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)