Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[deliverable/linux.git] / fs / binfmt_elf.c
index b0b9a779f9acb737c098efa68ba9e764da81db05..3a93755e880fee23fa6d8370916caefb21f2c9eb 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/utsname.h>
 #include <linux/coredump.h>
 #include <linux/sched.h>
+#include <linux/dax.h>
 #include <asm/uaccess.h>
 #include <asm/param.h>
 #include <asm/page.h>
@@ -1236,6 +1237,15 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
        if (vma->vm_flags & VM_DONTDUMP)
                return 0;
 
+       /* support for DAX */
+       if (vma_is_dax(vma)) {
+               if ((vma->vm_flags & VM_SHARED) && FILTER(DAX_SHARED))
+                       goto whole;
+               if (!(vma->vm_flags & VM_SHARED) && FILTER(DAX_PRIVATE))
+                       goto whole;
+               return 0;
+       }
+
        /* Hugetlb memory check */
        if (vma->vm_flags & VM_HUGETLB) {
                if ((vma->vm_flags & VM_SHARED) && FILTER(HUGETLB_SHARED))
This page took 0.028858 seconds and 5 git commands to generate.