diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-12 09:03:42 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-12 09:03:42 -0700 |
commit | 8d97b84935b28ed8944d1be31859a3df7ebe93ae (patch) | |
tree | ed0f23dde45812aec86a9ff0c14df3477f9d136c /arch/mips/kernel/irixelf.c | |
parent | 9f1a0735395ba2b2efa5012b5bf7f915299f1a79 (diff) | |
parent | cb0e8b0fba53e1aa6c4786bc465cfc641e8a77e7 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (28 commits)
[MIPS] Pb1000: bury the remnants of the PCI code
[MIPS] Fix build failure in mips oprofile code
[MIPS] fix warning message on SMP kernels
[MIPS] markeins: build fix
[MIPS] ELF handling - use SELFMAG instead of numeric constant
[MIPS] Get rid of __ilog2
[MIPS] Fix __fls for non-MIPS32/MIPS64 cpus
[MIPS] XXS1500 code style cleanup
[MIPS] MTX-1 code style cleanup
[MIPS] Pb1200/DBAu1200 code style cleanup
[MIPS] Pb1550 code style cleanup
[MIPS] Pb1500 code style cleanup
[MIPS] Pb1100 code style cleanup
[MIPS] Pb1000 code style cleanup
[MIPS] DBAu1xx0 code style cleanup
[MIPS] Alchemy PCI code style cleanup
[MIPS] Alchemy common code style cleanup
[MIPS] Alchemy common headers style cleanup
[MIPS] Add empty argument parenthesis to GCC_IMM_ASM
[MIPS] msp_hwbutton.c: minor irq handler cleanups
...
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); |