]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node()
authorLorenzo Stoakes <lstoakes@gmail.com>
Mon, 19 Dec 2022 12:36:59 +0000 (12:36 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 19 Jan 2023 01:12:45 +0000 (17:12 -0800)
This function sets __GFP_NOWARN in the gfp_mask rendering the warn_alloc()
invocations no-ops.  Remove this and instead rely on this flag being set
only for the vm_area_alloc_pages() function, ensuring it is cleared for
each of the warn_alloc() calls.

Link: https://lkml.kernel.org/r/20221219123659.90614-1-lstoakes@gmail.com
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c

index ca71de7c9d77544d283d2d6a5d13fb27c6d0c6c1..10fe83c24436507438f3e1b66eedc3f4798efceb 100644 (file)
@@ -3031,7 +3031,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
        int ret;
 
        array_size = (unsigned long)nr_small_pages * sizeof(struct page *);
-       gfp_mask |= __GFP_NOWARN;
+
        if (!(gfp_mask & (GFP_DMA | GFP_DMA32)))
                gfp_mask |= __GFP_HIGHMEM;