aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/kernel/perfmon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 48e560922be6..78acd9fe97e9 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)
2654 /* XXX: need to add more checks here */ 2654 /* XXX: need to add more checks here */
2655 if (pid < 2) return -EPERM; 2655 if (pid < 2) return -EPERM;
2656 2656
2657 if (pid != current->pid) { 2657 if (pid != task_pid_vnr(current)) {
2658 2658
2659 read_lock(&tasklist_lock); 2659 read_lock(&tasklist_lock);
2660 2660
2661 p = find_task_by_pid(pid); 2661 p = find_task_by_vpid(pid);
2662 2662
2663 /* make sure task cannot go away while we operate on it */ 2663 /* make sure task cannot go away while we operate on it */
2664 if (p) get_task_struct(p); 2664 if (p) get_task_struct(p);