diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-07 07:23:45 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-09 00:16:25 -0500 |
commit | 1ad67015e619ba4e0b15ed0482d464292fedf263 (patch) | |
tree | 1eb5523ba610f9bd32396e4366b75e39d339606d /fs/binfmt_elf.c | |
parent | 43a5d548eb5949580c1d96b9f3fa9f4c0bee0b98 (diff) |
binfmt_elf: count notes towards coredump limit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r-- | fs/binfmt_elf.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 3bf75d767a4a..4f7dda9d86b5 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -2034,7 +2034,6 @@ static int elf_core_dump(struct coredump_params *cprm) | |||
2034 | int has_dumped = 0; | 2034 | int has_dumped = 0; |
2035 | mm_segment_t fs; | 2035 | mm_segment_t fs; |
2036 | int segs; | 2036 | int segs; |
2037 | size_t size = 0; | ||
2038 | struct vm_area_struct *vma, *gate_vma; | 2037 | struct vm_area_struct *vma, *gate_vma; |
2039 | struct elfhdr *elf = NULL; | 2038 | struct elfhdr *elf = NULL; |
2040 | loff_t offset = 0, dataoff; | 2039 | loff_t offset = 0, dataoff; |
@@ -2155,7 +2154,6 @@ static int elf_core_dump(struct coredump_params *cprm) | |||
2155 | if (!elf_core_write_extra_phdrs(cprm, offset)) | 2154 | if (!elf_core_write_extra_phdrs(cprm, offset)) |
2156 | goto end_coredump; | 2155 | goto end_coredump; |
2157 | 2156 | ||
2158 | size = cprm->written; | ||
2159 | /* write out the notes section */ | 2157 | /* write out the notes section */ |
2160 | if (!write_note_info(&info, cprm)) | 2158 | if (!write_note_info(&info, cprm)) |
2161 | goto end_coredump; | 2159 | goto end_coredump; |
@@ -2167,7 +2165,6 @@ static int elf_core_dump(struct coredump_params *cprm) | |||
2167 | if (!dump_seek(cprm->file, dataoff - cprm->written)) | 2165 | if (!dump_seek(cprm->file, dataoff - cprm->written)) |
2168 | goto end_coredump; | 2166 | goto end_coredump; |
2169 | 2167 | ||
2170 | cprm->written = size; | ||
2171 | for (vma = first_vma(current, gate_vma); vma != NULL; | 2168 | for (vma = first_vma(current, gate_vma); vma != NULL; |
2172 | vma = next_vma(vma, gate_vma)) { | 2169 | vma = next_vma(vma, gate_vma)) { |
2173 | unsigned long addr; | 2170 | unsigned long addr; |