aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/ia32/ia32_aout.c14
-rw-r--r--fs/binfmt_aout.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
index fd843877e841..39e49091f648 100644
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -315,6 +315,13 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
315 current->mm->free_area_cache = TASK_UNMAPPED_BASE; 315 current->mm->free_area_cache = TASK_UNMAPPED_BASE;
316 current->mm->cached_hole_size = 0; 316 current->mm->cached_hole_size = 0;
317 317
318 retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT);
319 if (retval < 0) {
320 /* Someone check-me: is this error path enough? */
321 send_sig(SIGKILL, current, 0);
322 return retval;
323 }
324
318 install_exec_creds(bprm); 325 install_exec_creds(bprm);
319 current->flags &= ~PF_FORKNOEXEC; 326 current->flags &= ~PF_FORKNOEXEC;
320 327
@@ -410,13 +417,6 @@ beyond_if:
410 417
411 set_brk(current->mm->start_brk, current->mm->brk); 418 set_brk(current->mm->start_brk, current->mm->brk);
412 419
413 retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT);
414 if (retval < 0) {
415 /* Someone check-me: is this error path enough? */
416 send_sig(SIGKILL, current, 0);
417 return retval;
418 }
419
420 current->mm->start_stack = 420 current->mm->start_stack =
421 (unsigned long)create_aout_tables((char __user *)bprm->p, bprm); 421 (unsigned long)create_aout_tables((char __user *)bprm->p, bprm);
422 /* start thread */ 422 /* start thread */
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index a6395bdb26ae..1ff94054d35a 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -259,6 +259,13 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
259 current->mm->free_area_cache = current->mm->mmap_base; 259 current->mm->free_area_cache = current->mm->mmap_base;
260 current->mm->cached_hole_size = 0; 260 current->mm->cached_hole_size = 0;
261 261
262 retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
263 if (retval < 0) {
264 /* Someone check-me: is this error path enough? */
265 send_sig(SIGKILL, current, 0);
266 return retval;
267 }
268
262 install_exec_creds(bprm); 269 install_exec_creds(bprm);
263 current->flags &= ~PF_FORKNOEXEC; 270 current->flags &= ~PF_FORKNOEXEC;
264 271
@@ -352,13 +359,6 @@ beyond_if:
352 return retval; 359 return retval;
353 } 360 }
354 361
355 retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
356 if (retval < 0) {
357 /* Someone check-me: is this error path enough? */
358 send_sig(SIGKILL, current, 0);
359 return retval;
360 }
361
362 current->mm->start_stack = 362 current->mm->start_stack =
363 (unsigned long) create_aout_tables((char __user *) bprm->p, bprm); 363 (unsigned long) create_aout_tables((char __user *) bprm->p, bprm);
364#ifdef __alpha__ 364#ifdef __alpha__