Commit 481a21d6 authored by David Howells's avatar David Howells Committed by Linus Torvalds

[PATCH] Fix usage of setup_arg_pages() in IA64, MIPS, S390 and Sparc64

The attached patch fixes the usage of setup_arg_pages() in the IA64, MIPS,
S390 and Sparc64 arches.  This function now takes an extra parameter: the
initial top of stack.  This is useful in uClinux when there's no fixed
location to which the stack pointer can be initialised.
Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 60093d36
......@@ -35,7 +35,7 @@ extern void ia64_elf32_init (struct pt_regs *regs);
static void elf32_set_personality (void);
#define setup_arg_pages(bprm,exec) ia32_setup_arg_pages(bprm,exec)
#define setup_arg_pages(bprm,tos,exec) ia32_setup_arg_pages(bprm,exec)
#define elf_map elf32_map
#undef SET_PERSONALITY
......
......@@ -685,7 +685,7 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
* change some of these later.
*/
current->mm->rss = 0;
setup_arg_pages(bprm, EXSTACK_DEFAULT);
setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
current->mm->start_stack = bprm->p;
/* At this point, we assume that the image should be loaded at
......
......@@ -311,7 +311,7 @@ static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs)
orig_thr_flags = current_thread_info()->flags;
current_thread_info()->flags |= _TIF_32BIT;
retval = setup_arg_pages(bprm, EXSTACK_DEFAULT);
retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
if (retval < 0) {
current_thread_info()->flags = orig_thr_flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment