diff options
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index d3634bfb7fe1..863250157aa7 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/elf-fdpic.h> | 35 | #include <linux/elf-fdpic.h> |
36 | #include <linux/elfcore.h> | 36 | #include <linux/elfcore.h> |
37 | #include <linux/coredump.h> | 37 | #include <linux/coredump.h> |
38 | #include <linux/dax.h> | ||
38 | 39 | ||
39 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
40 | #include <asm/param.h> | 41 | #include <asm/param.h> |
@@ -1206,6 +1207,20 @@ static int maydump(struct vm_area_struct *vma, unsigned long mm_flags) | |||
1206 | return 0; | 1207 | return 0; |
1207 | } | 1208 | } |
1208 | 1209 | ||
1210 | /* support for DAX */ | ||
1211 | if (vma_is_dax(vma)) { | ||
1212 | if (vma->vm_flags & VM_SHARED) { | ||
1213 | dump_ok = test_bit(MMF_DUMP_DAX_SHARED, &mm_flags); | ||
1214 | kdcore("%08lx: %08lx: %s (DAX shared)", vma->vm_start, | ||
1215 | vma->vm_flags, dump_ok ? "yes" : "no"); | ||
1216 | } else { | ||
1217 | dump_ok = test_bit(MMF_DUMP_DAX_PRIVATE, &mm_flags); | ||
1218 | kdcore("%08lx: %08lx: %s (DAX private)", vma->vm_start, | ||
1219 | vma->vm_flags, dump_ok ? "yes" : "no"); | ||
1220 | } | ||
1221 | return dump_ok; | ||
1222 | } | ||
1223 | |||
1209 | /* By default, dump shared memory if mapped from an anonymous file. */ | 1224 | /* By default, dump shared memory if mapped from an anonymous file. */ |
1210 | if (vma->vm_flags & VM_SHARED) { | 1225 | if (vma->vm_flags & VM_SHARED) { |
1211 | if (file_inode(vma->vm_file)->i_nlink == 0) { | 1226 | if (file_inode(vma->vm_file)->i_nlink == 0) { |