[MIPS] Use find_task_by_vpid in system calls
authorPavel Emelyanov <xemul@openvz.org>
Tue, 5 Feb 2008 07:44:24 +0000 (23:44 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 19 Feb 2008 17:01:30 +0000 (17:01 +0000)
There are some places left in mips, that lookup task in initial namespace,
while the code doing so gets the pid from the user space and thus must
treat it as virtual.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/mips-mt-fpaff.c
arch/mips/kernel/sysirix.c

index bb4f00c0cbe94f8a5dfe1c822a072f1c6d4de928..df4d3f2f740c54fa73b413e8b8c8d91601b95c74 100644 (file)
@@ -36,7 +36,7 @@ unsigned long mt_fpemul_threshold = 0;
  */
 static inline struct task_struct *find_process_by_pid(pid_t pid)
 {
-       return pid ? find_task_by_pid(pid) : current;
+       return pid ? find_task_by_vpid(pid) : current;
 }
 
 
index 672fba84b2ccb50a145a7966890a8dfb6b4562f0..c357762b801286803099afd629a7550e70954df4 100644 (file)
@@ -111,7 +111,7 @@ asmlinkage int irix_prctl(unsigned option, ...)
                printk("irix_prctl[%s:%d]: Wants PR_ISBLOCKED\n",
                       current->comm, current->pid);
                read_lock(&tasklist_lock);
-               task = find_task_by_pid(va_arg(args, pid_t));
+               task = find_task_by_vpid(va_arg(args, pid_t));
                error = -ESRCH;
                if (error)
                        error = (task->run_list.next != NULL);