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>
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
index 22fd41e..d70c4e0 100644
--- a/arch/mips/kernel/sysirix.c
+++ b/arch/mips/kernel/sysirix.c
@@ -582,8 +582,8 @@
asmlinkage int irix_getpid(struct pt_regs *regs)
{
- regs->regs[3] = current->real_parent->pid;
- return current->pid;
+ regs->regs[3] = task_pid_vnr(current->real_parent);
+ return task_pid_vnr(current);
}
asmlinkage int irix_getuid(struct pt_regs *regs)
@@ -763,11 +763,11 @@
printk("[%s:%d] setpgrp(%d) ", current->comm, current->pid, flags);
#endif
if(!flags)
- error = task_pgrp_nr(current);
+ error = task_pgrp_vnr(current);
else
error = sys_setsid();
#ifdef DEBUG_PROCGRPS
- printk("returning %d\n", task_pgrp_nr(current));
+ printk("returning %d\n", error);
#endif
return error;
@@ -1093,10 +1093,10 @@
pid, pgrp);
#endif
if(!pid)
- pid = current->pid;
+ pid = task_pid_vnr(current);
/* Wheee, weird sysv thing... */
- if ((pgrp == 0) && (pid == current->pid))
+ if ((pgrp == 0) && (pid == task_pid_vnr(current)))
error = sys_setsid();
else
error = sys_setpgid(pid, pgrp);