The patch titled Subject: mm/vmalloc: print correct vmalloc allocation size has been added to the -mm tree. Its filename is mm-vmalloc-improve-allocation-failure-error-messages-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-vmalloc-improve-allocation-failure-error-messages-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmalloc-improve-allocation-failure-error-messages-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: "Uladzislau Rezki (Sony)" <urezki@xxxxxxxxx> Subject: mm/vmalloc: print correct vmalloc allocation size On entry the area->nr_pages is not set yet and is zero, thus when an allocation of the page-table array fails the vmalloc size will not be reflected correctly in a error message. Replace area->nr_pages by the nr_small_pages. Link: https://lkml.kernel.org/r/20210329193214.GA28602@xxxxxxxxx Fixes: 014ccf9b888d ("mm/vmalloc: improve allocation failure error messages") Signed-off-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx> Reported-by: Colin King <colin.king@xxxxxxxxxxxxx> Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Cc: Nicholas Piggin <npiggin@xxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/vmalloc.c~mm-vmalloc-improve-allocation-failure-error-messages-fix +++ a/mm/vmalloc.c @@ -2793,7 +2793,7 @@ static void *__vmalloc_area_node(struct warn_alloc(gfp_mask, NULL, "vmalloc size %lu allocation failure: " "page array size %lu allocation failed", - area->nr_pages * PAGE_SIZE, array_size); + nr_small_pages * PAGE_SIZE, array_size); return NULL; } _ Patches currently in -mm which might be from urezki@xxxxxxxxx are mm-vmalloc-improve-allocation-failure-error-messages-fix.patch