diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-02-05 02:43:03 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-02-05 11:27:29 -0500 |
commit | e1b0d4ba46b42909d11ea152a6b56ee76f062ca3 (patch) | |
tree | 103c5058abed248bed610396c28341bad7fe8701 /arch/ia64 | |
parent | 620de2f5dc697f906408743b1139fe5fb7b0b7f8 (diff) |
[IA64] make pfm_get_task work with virtual pids
This pid comes from user space, so treat it accordingly.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 4 |
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); |