binfmt_elf: count notes towards coredump limit
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Oct 2013 11:23:45 +0000 (07:23 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 9 Nov 2013 05:16:25 +0000 (00:16 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/binfmt_elf.c

index 3bf75d767a4ae434f8bdc317f37e6395cb01271f..4f7dda9d86b51d633c4a57bbbcff211397db33d9 100644 (file)
@@ -2034,7 +2034,6 @@ static int elf_core_dump(struct coredump_params *cprm)
        int has_dumped = 0;
        mm_segment_t fs;
        int segs;
-       size_t size = 0;
        struct vm_area_struct *vma, *gate_vma;
        struct elfhdr *elf = NULL;
        loff_t offset = 0, dataoff;
@@ -2155,7 +2154,6 @@ static int elf_core_dump(struct coredump_params *cprm)
        if (!elf_core_write_extra_phdrs(cprm, offset))
                goto end_coredump;
 
-       size = cprm->written;
        /* write out the notes section */
        if (!write_note_info(&info, cprm))
                goto end_coredump;
@@ -2167,7 +2165,6 @@ static int elf_core_dump(struct coredump_params *cprm)
        if (!dump_seek(cprm->file, dataoff - cprm->written))
                goto end_coredump;
 
-       cprm->written = size;
        for (vma = first_vma(current, gate_vma); vma != NULL;
                        vma = next_vma(vma, gate_vma)) {
                unsigned long addr;