From: Sanath Kumar Date: Thu, 29 Jun 2017 17:13:28 +0000 (-0500) Subject: sparc64: Suppress kmalloc (DAX driver) warning due to allocation failure X-Git-Tag: v4.1.12-106.0.20170720_1900~92 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=982af57e595884c41090fd38ade55553c60c6f97;p=users%2Fjedix%2Flinux-maple.git sparc64: Suppress kmalloc (DAX driver) warning due to allocation failure dax_alloc is used by libdax to allocate 4MB chunks of physically contiguous memory using kmalloc. It is normal for dax_alloc to fail when kmalloc runs out of memory and this should not be treated as a warning. This failure should be caught in libdax and attempted to allocate memory from another source (Eg: mmap hugepage). Orabug: 26224254 Signed-off-by: Sanath Kumar Reviewed-by: Rob Gardner Reviewed-by: Liam R. Howlett Signed-off-by: Allen Pais --- diff --git a/arch/sparc/dax/dax_mm.c b/arch/sparc/dax/dax_mm.c index 4ae6747382007..97a8fa0e5596e 100644 --- a/arch/sparc/dax/dax_mm.c +++ b/arch/sparc/dax/dax_mm.c @@ -67,7 +67,7 @@ static int dax_alloc_ram(struct file *filp, struct vm_area_struct *vma) goto done; } - kva = kzalloc(len, GFP_KERNEL); + kva = kzalloc(len, GFP_KERNEL | __GFP_NOWARN); if (kva == NULL) goto done;