aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/sysirix.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2008-02-08 07:19:16 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:28 -0500
commit69440e76f6121fe7a5193a82f45ccec08e4bb24b (patch)
tree1a573c55bbcb8d8d83f7a21551ca08c6ac35dfe8 /arch/mips/kernel/sysirix.c
parentac9a8e3f0f43d20fc316162e8e5f9186d295ff49 (diff)
pid: fix mips irix emulation pid usage
[m.kozlowski@tuxland.pl: fix unbalanced parenthesis in irix_BSDsetpgrp()] Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips/kernel/sysirix.c')
-rw-r--r--arch/mips/kernel/sysirix.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
index 22fd41e946b2..d70c4e0e85fb 100644
--- a/arch/mips/kernel/sysirix.c
+++ b/arch/mips/kernel/sysirix.c
@@ -582,8 +582,8 @@ out:
582 582
583asmlinkage int irix_getpid(struct pt_regs *regs) 583asmlinkage int irix_getpid(struct pt_regs *regs)
584{ 584{
585 regs->regs[3] = current->real_parent->pid; 585 regs->regs[3] = task_pid_vnr(current->real_parent);
586 return current->pid; 586 return task_pid_vnr(current);
587} 587}
588 588
589asmlinkage int irix_getuid(struct pt_regs *regs) 589asmlinkage int irix_getuid(struct pt_regs *regs)
@@ -763,11 +763,11 @@ asmlinkage int irix_setpgrp(int flags)
763 printk("[%s:%d] setpgrp(%d) ", current->comm, current->pid, flags); 763 printk("[%s:%d] setpgrp(%d) ", current->comm, current->pid, flags);
764#endif 764#endif
765 if(!flags) 765 if(!flags)
766 error = task_pgrp_nr(current); 766 error = task_pgrp_vnr(current);
767 else 767 else
768 error = sys_setsid(); 768 error = sys_setsid();
769#ifdef DEBUG_PROCGRPS 769#ifdef DEBUG_PROCGRPS
770 printk("returning %d\n", task_pgrp_nr(current)); 770 printk("returning %d\n", error);
771#endif 771#endif
772 772
773 return error; 773 return error;
@@ -1093,10 +1093,10 @@ asmlinkage int irix_BSDsetpgrp(int pid, int pgrp)
1093 pid, pgrp); 1093 pid, pgrp);
1094#endif 1094#endif
1095 if(!pid) 1095 if(!pid)
1096 pid = current->pid; 1096 pid = task_pid_vnr(current);
1097 1097
1098 /* Wheee, weird sysv thing... */ 1098 /* Wheee, weird sysv thing... */
1099 if ((pgrp == 0) && (pid == current->pid)) 1099 if ((pgrp == 0) && (pid == task_pid_vnr(current)))
1100 error = sys_setsid(); 1100 error = sys_setsid();
1101 else 1101 else
1102 error = sys_setpgid(pid, pgrp); 1102 error = sys_setpgid(pid, pgrp);