aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32/ia32_aout.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/ia32/ia32_aout.c')
-rw-r--r--arch/x86/ia32/ia32_aout.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
index 08781370256d..7cf1c29bf90e 100644
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -40,7 +40,7 @@ static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs);
40static int load_aout_library(struct file*); 40static int load_aout_library(struct file*);
41 41
42#ifdef CORE_DUMP 42#ifdef CORE_DUMP
43static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file); 43static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit);
44 44
45/* 45/*
46 * fill in the user structure for a core dump.. 46 * fill in the user structure for a core dump..
@@ -148,7 +148,7 @@ if (file->f_op->llseek) { \
148 * dumping of the process results in another error.. 148 * dumping of the process results in another error..
149 */ 149 */
150 150
151static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file) 151static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit)
152{ 152{
153 mm_segment_t fs; 153 mm_segment_t fs;
154 int has_dumped = 0; 154 int has_dumped = 0;
@@ -168,13 +168,11 @@ static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file)
168 168
169/* If the size of the dump file exceeds the rlimit, then see what would happen 169/* If the size of the dump file exceeds the rlimit, then see what would happen
170 if we wrote the stack, but not the data area. */ 170 if we wrote the stack, but not the data area. */
171 if ((dump.u_dsize+dump.u_ssize+1) * PAGE_SIZE > 171 if ((dump.u_dsize + dump.u_ssize + 1) * PAGE_SIZE > limit)
172 current->signal->rlim[RLIMIT_CORE].rlim_cur)
173 dump.u_dsize = 0; 172 dump.u_dsize = 0;
174 173
175/* Make sure we have enough room to write the stack and data areas. */ 174/* Make sure we have enough room to write the stack and data areas. */
176 if ((dump.u_ssize+1) * PAGE_SIZE > 175 if ((dump.u_ssize + 1) * PAGE_SIZE > limit)
177 current->signal->rlim[RLIMIT_CORE].rlim_cur)
178 dump.u_ssize = 0; 176 dump.u_ssize = 0;
179 177
180/* make sure we actually have a data and stack area to dump */ 178/* make sure we actually have a data and stack area to dump */