]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: Suppress kmalloc (DAX driver) warning due to allocation failure
authorSanath Kumar <sanath.s.kumar@oracle.com>
Thu, 29 Jun 2017 17:13:28 +0000 (12:13 -0500)
committerAllen Pais <allen.pais@oracle.com>
Tue, 11 Jul 2017 07:36:49 +0000 (13:06 +0530)
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 <sanath.s.kumar@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/dax/dax_mm.c

index 4ae67473820078b5e0f5e5f490b491551183d5c4..97a8fa0e5596e6549ed7899ddbdd56ddf9e6a441 100644 (file)
@@ -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;