aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_aout.c
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2012-03-05 01:38:42 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-05 16:51:32 -0500
commit6414fa6a150111750011f477899d370244da4171 (patch)
tree3ce9a86bf828b9b61ee77e74786a2cdd716bf154 /fs/binfmt_aout.c
parent550cf00dbc8ee402bef71628cb71246493dd4500 (diff)
aout: move setup_arg_pages() prior to reading/mapping the binary
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_aout.c')
-rw-r--r--fs/binfmt_aout.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index a6395bdb26a..1ff94054d35 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__