mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node()
Subsystems (2)
PATCH v2 1/1 mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node()
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.
Signed-off-by Lorenzo Stoakes <[email protected]>
--- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmalloc.c +1 -1
@@ -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;
--
2.39.0
Quoted 24 lines · Lorenzo Stoakes
This function sets
__GFP_NOWARNin thegfp_maskrendering thewarn_alloc()invocations no-ops. Remove this and instead rely on this flag being set only for thevm_area_alloc_pages()function, ensuring it is cleared for each of thewarn_alloc()calls.Signed-off-by Lorenzo Stoakes <[email protected]>--- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/vmalloc.c +1
-2@@ -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; --
Quoted 1 line
2.39.0
Reviewed-by Uladzislau Rezki (Sony) <[email protected]>
--
Uladzislau Rezki