diff options
Diffstat (limited to 'arch/x86/ia32/ia32_aout.c')
-rw-r--r-- | arch/x86/ia32/ia32_aout.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 2a4d073d2cf1..0350311906ae 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/fcntl.h> | 21 | #include <linux/fcntl.h> |
22 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
23 | #include <linux/user.h> | 23 | #include <linux/user.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/binfmts.h> | 24 | #include <linux/binfmts.h> |
26 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
@@ -297,7 +296,7 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
297 | * size limits imposed on them by creating programs with large | 296 | * size limits imposed on them by creating programs with large |
298 | * arrays in the data or bss. | 297 | * arrays in the data or bss. |
299 | */ | 298 | */ |
300 | rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur; | 299 | rlim = rlimit(RLIMIT_DATA); |
301 | if (rlim >= RLIM_INFINITY) | 300 | if (rlim >= RLIM_INFINITY) |
302 | rlim = ~0; | 301 | rlim = ~0; |
303 | if (ex.a_data + ex.a_bss > rlim) | 302 | if (ex.a_data + ex.a_bss > rlim) |
@@ -308,14 +307,15 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
308 | if (retval) | 307 | if (retval) |
309 | return retval; | 308 | return retval; |
310 | 309 | ||
311 | regs->cs = __USER32_CS; | ||
312 | regs->r8 = regs->r9 = regs->r10 = regs->r11 = regs->r12 = | ||
313 | regs->r13 = regs->r14 = regs->r15 = 0; | ||
314 | |||
315 | /* OK, This is the point of no return */ | 310 | /* OK, This is the point of no return */ |
316 | set_personality(PER_LINUX); | 311 | set_personality(PER_LINUX); |
317 | set_thread_flag(TIF_IA32); | 312 | set_thread_flag(TIF_IA32); |
318 | clear_thread_flag(TIF_ABI_PENDING); | 313 | |
314 | setup_new_exec(bprm); | ||
315 | |||
316 | regs->cs = __USER32_CS; | ||
317 | regs->r8 = regs->r9 = regs->r10 = regs->r11 = regs->r12 = | ||
318 | regs->r13 = regs->r14 = regs->r15 = 0; | ||
319 | 319 | ||
320 | current->mm->end_code = ex.a_text + | 320 | current->mm->end_code = ex.a_text + |
321 | (current->mm->start_code = N_TXTADDR(ex)); | 321 | (current->mm->start_code = N_TXTADDR(ex)); |
@@ -326,7 +326,6 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
326 | current->mm->free_area_cache = TASK_UNMAPPED_BASE; | 326 | current->mm->free_area_cache = TASK_UNMAPPED_BASE; |
327 | current->mm->cached_hole_size = 0; | 327 | current->mm->cached_hole_size = 0; |
328 | 328 | ||
329 | current->mm->mmap = NULL; | ||
330 | install_exec_creds(bprm); | 329 | install_exec_creds(bprm); |
331 | current->flags &= ~PF_FORKNOEXEC; | 330 | current->flags &= ~PF_FORKNOEXEC; |
332 | 331 | ||