summaryrefslogtreecommitdiff
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 35c4886dae2d..a998b221b53a 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -2196,8 +2196,10 @@ static int elf_core_dump(struct coredump_params *cprm)
}
}
- if (!elf_core_write_extra_data(cprm->file, &size, cprm->limit))
+ cprm->written = size;
+ if (!elf_core_write_extra_data(cprm))
goto end_coredump;
+ size = cprm->written;
if (e_phnum == PN_XNUM) {
size += sizeof(*shdr4extnum);