aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/binfmt_elf.c5
-rw-r--r--fs/binfmt_elf_fdpic.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index a2fceba7ef8e..9cc4f0a8aaae 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1704,7 +1704,10 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
1704 DUMP_SEEK(PAGE_SIZE); 1704 DUMP_SEEK(PAGE_SIZE);
1705 } else { 1705 } else {
1706 if (page == ZERO_PAGE(addr)) { 1706 if (page == ZERO_PAGE(addr)) {
1707 DUMP_SEEK(PAGE_SIZE); 1707 if (!dump_seek(file, PAGE_SIZE)) {
1708 page_cache_release(page);
1709 goto end_coredump;
1710 }
1708 } else { 1711 } else {
1709 void *kaddr; 1712 void *kaddr;
1710 flush_cache_page(vma, addr, 1713 flush_cache_page(vma, addr,
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 47d6d49d1fb9..f3ddca4a387b 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1480,8 +1480,8 @@ static int elf_fdpic_dump_segments(struct file *file, struct mm_struct *mm,
1480 DUMP_SEEK(file->f_pos + PAGE_SIZE); 1480 DUMP_SEEK(file->f_pos + PAGE_SIZE);
1481 } 1481 }
1482 else if (page == ZERO_PAGE(addr)) { 1482 else if (page == ZERO_PAGE(addr)) {
1483 DUMP_SEEK(file->f_pos + PAGE_SIZE);
1484 page_cache_release(page); 1483 page_cache_release(page);
1484 DUMP_SEEK(file->f_pos + PAGE_SIZE);
1485 } 1485 }
1486 else { 1486 else {
1487 void *kaddr; 1487 void *kaddr;