diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-05 17:22:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-09 00:16:23 -0500 |
commit | 506f21c556c747bb07b893f146220ec45cda381b (patch) | |
tree | 314bda008996a302a73779d522c349eb174dc8b9 /fs | |
parent | ecc8c7725e6c21528329b34acae2a1d64b3af89b (diff) |
switch elf_core_write_extra_phdrs() to dump_emit()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_elf.c | 4 | ||||
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 00fd9c969a27..35c4886dae2d 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -2152,11 +2152,11 @@ static int elf_core_dump(struct coredump_params *cprm) | |||
2152 | if (!dump_emit(cprm, &phdr, sizeof(phdr))) | 2152 | if (!dump_emit(cprm, &phdr, sizeof(phdr))) |
2153 | goto end_coredump; | 2153 | goto end_coredump; |
2154 | } | 2154 | } |
2155 | size = cprm->written; | ||
2156 | 2155 | ||
2157 | if (!elf_core_write_extra_phdrs(cprm->file, offset, &size, cprm->limit)) | 2156 | if (!elf_core_write_extra_phdrs(cprm, offset)) |
2158 | goto end_coredump; | 2157 | goto end_coredump; |
2159 | 2158 | ||
2159 | size = cprm->written; | ||
2160 | cprm->written = foffset; /* will disappear */ | 2160 | cprm->written = foffset; /* will disappear */ |
2161 | /* write out the notes section */ | 2161 | /* write out the notes section */ |
2162 | if (!write_note_info(&info, cprm)) | 2162 | if (!write_note_info(&info, cprm)) |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index ea4c6273b4a5..44db8b92121a 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -1791,9 +1791,11 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) | |||
1791 | goto end_coredump; | 1791 | goto end_coredump; |
1792 | } | 1792 | } |
1793 | 1793 | ||
1794 | if (!elf_core_write_extra_phdrs(cprm->file, offset, &size, cprm->limit)) | 1794 | cprm->written = size; |
1795 | if (!elf_core_write_extra_phdrs(cprm, offset)) | ||
1795 | goto end_coredump; | 1796 | goto end_coredump; |
1796 | 1797 | ||
1798 | size = cprm->written; | ||
1797 | /* write out the notes section */ | 1799 | /* write out the notes section */ |
1798 | for (i = 0; i < numnote; i++) | 1800 | for (i = 0; i < numnote; i++) |
1799 | if (!writenote(notes + i, cprm->file, &foffset)) | 1801 | if (!writenote(notes + i, cprm->file, &foffset)) |