From 506f21c556c747bb07b893f146220ec45cda381b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 5 Oct 2013 17:22:57 -0400 Subject: switch elf_core_write_extra_phdrs() to dump_emit() Signed-off-by: Al Viro --- fs/binfmt_elf.c | 4 ++-- fs/binfmt_elf_fdpic.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'fs') 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) if (!dump_emit(cprm, &phdr, sizeof(phdr))) goto end_coredump; } - size = cprm->written; - if (!elf_core_write_extra_phdrs(cprm->file, offset, &size, cprm->limit)) + if (!elf_core_write_extra_phdrs(cprm, offset)) goto end_coredump; + size = cprm->written; cprm->written = foffset; /* will disappear */ /* write out the notes section */ 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) goto end_coredump; } - if (!elf_core_write_extra_phdrs(cprm->file, offset, &size, cprm->limit)) + cprm->written = size; + if (!elf_core_write_extra_phdrs(cprm, offset)) goto end_coredump; + size = cprm->written; /* write out the notes section */ for (i = 0; i < numnote; i++) if (!writenote(notes + i, cprm->file, &foffset)) -- cgit v1.2.3