aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/binfmt_elf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index fa8ea33ab0be..08e4414b8374 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1499,6 +1499,9 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
1499#endif 1499#endif
1500 int thread_status_size = 0; 1500 int thread_status_size = 0;
1501 elf_addr_t *auxv; 1501 elf_addr_t *auxv;
1502#ifdef ELF_CORE_WRITE_EXTRA_NOTES
1503 int extra_notes_size;
1504#endif
1502 1505
1503 /* 1506 /*
1504 * We no longer stop all VM operations. 1507 * We no longer stop all VM operations.
@@ -1628,7 +1631,8 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
1628 sz += thread_status_size; 1631 sz += thread_status_size;
1629 1632
1630#ifdef ELF_CORE_WRITE_EXTRA_NOTES 1633#ifdef ELF_CORE_WRITE_EXTRA_NOTES
1631 sz += ELF_CORE_EXTRA_NOTES_SIZE; 1634 extra_notes_size = ELF_CORE_EXTRA_NOTES_SIZE;
1635 sz += extra_notes_size;
1632#endif 1636#endif
1633 1637
1634 fill_elf_note_phdr(&phdr, sz, offset); 1638 fill_elf_note_phdr(&phdr, sz, offset);
@@ -1674,6 +1678,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)
1674 1678
1675#ifdef ELF_CORE_WRITE_EXTRA_NOTES 1679#ifdef ELF_CORE_WRITE_EXTRA_NOTES
1676 ELF_CORE_WRITE_EXTRA_NOTES; 1680 ELF_CORE_WRITE_EXTRA_NOTES;
1681 foffset += extra_notes_size;
1677#endif 1682#endif
1678 1683
1679 /* write out the thread status notes section */ 1684 /* write out the thread status notes section */