Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96413
b: refs/heads/master
c: f4324f3
h: refs/heads/master
i:
  96411: a154929
v: v3
  • Loading branch information
Ralf Baechle committed May 12, 2008
1 parent 8cda971 commit 567dae5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1928cc84a0a937ce7042d9235996ab380f36f18a
refs/heads/master: f4324f3eeb311d1889b8c25076f2669012323842
11 changes: 7 additions & 4 deletions trunk/arch/mips/kernel/irixelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -587,15 +587,17 @@ static void irix_map_prda_page(void)
v = do_brk(PRDA_ADDRESS, PAGE_SIZE);
up_write(&current->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);
pp->prda_sys.t_prid = read_c0_prid();
pp->prda_sys.t_rpid = task_pid_vnr(current);

/* We leave the rest set to zero */

return 0;
}


Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 567dae5

Please sign in to comment.