diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-12 22:29:14 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-12 22:29:14 +0200 |
commit | 5aaca7a7a5db157530d195c4b93c8fc4682f8a48 (patch) | |
tree | 1c9a2a7e898c8a460bc10d7f3c5c8308188c0072 /arch/mips/kernel/irixelf.c | |
parent | 8c6b0ef2ea1bb42cd72d987389297f66cd25790b (diff) | |
parent | 9404ef02974a5411687b6c1b8ef3984305620e02 (diff) | |
download | talos-obmc-linux-5aaca7a7a5db157530d195c4b93c8fc4682f8a48.tar.gz talos-obmc-linux-5aaca7a7a5db157530d195c4b93c8fc4682f8a48.zip |
Merge branch 'linus' into x86/urgent
Diffstat (limited to 'arch/mips/kernel/irixelf.c')
-rw-r--r-- | arch/mips/kernel/irixelf.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 290d8e3a664d..469c7237e5ba 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -578,7 +578,7 @@ static inline int map_interpreter(struct elf_phdr *epp, struct elfhdr *ihp, * process and the system, here we map the page and fill the * structure */ -static void irix_map_prda_page(void) +static int irix_map_prda_page(void) { unsigned long v; struct prda *pp; @@ -587,8 +587,8 @@ static void irix_map_prda_page(void) v = do_brk(PRDA_ADDRESS, PAGE_SIZE); up_write(¤t->mm->mmap_sem); - if (v < 0) - return; + if (v != PRDA_ADDRESS) + return v; /* v must be an error code */ pp = (struct prda *) v; pp->prda_sys.t_pid = task_pid_vnr(current); @@ -596,6 +596,8 @@ static void irix_map_prda_page(void) pp->prda_sys.t_rpid = task_pid_vnr(current); /* We leave the rest set to zero */ + + return 0; } @@ -781,7 +783,8 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs) * IRIX maps a page at 0x200000 which holds some system * information. Programs depend on this. */ - irix_map_prda_page(); + if (irix_map_prda_page()) + goto out_free_dentry; padzero(elf_bss); |