From: Pavel Emelyanov Date: Tue, 5 Feb 2008 07:43:03 +0000 (-0800) Subject: [IA64] make pfm_get_task work with virtual pids X-Git-Tag: v2.6.25-rc1~785^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e1b0d4ba46b42909d11ea152a6b56ee76f062ca3;p=linux-2.6-omap-h63xx.git [IA64] make pfm_get_task work with virtual pids This pid comes from user space, so treat it accordingly. Signed-off-by: Pavel Emelyanov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 48e560922be..78acd9fe97e 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -2654,11 +2654,11 @@ pfm_get_task(pfm_context_t *ctx, pid_t pid, struct task_struct **task) /* XXX: need to add more checks here */ if (pid < 2) return -EPERM; - if (pid != current->pid) { + if (pid != task_pid_vnr(current)) { read_lock(&tasklist_lock); - p = find_task_by_pid(pid); + p = find_task_by_vpid(pid); /* make sure task cannot go away while we operate on it */ if (p) get_task_struct(p);