Matt Helsley 38a81da220 perf events: Clean up pid passing
The kernel perf event creation path shouldn't use find_task_by_vpid()
because a vpid exists in a specific namespace. find_task_by_vpid() uses
current's pid namespace which isn't always the correct namespace to use
for the vpid in all the places perf_event_create_kernel_counter() (and
thus find_get_context()) is called.

The goal is to clean up pid namespace handling and prevent bugs like:

	https://bugzilla.kernel.org/show_bug.cgi?id=17281

Instead of using pids switch find_get_context() to use task struct
pointers directly. The syscall is responsible for resolving the pid to
a task struct. This moves the pid namespace resolution into the syscall
much like every other syscall that takes pid parameters.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robin Green <greenrd@greenrd.org>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
LKML-Reference: <a134e5e392ab0204961fd1a62c84a222bf5874a9.1284407763.git.matthltc@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-09-15 10:44:00 +02:00
..
2010-08-05 13:26:20 +01:00
2010-08-12 06:38:24 +10:00
2010-09-08 10:50:00 -06:00
2010-06-15 09:56:01 +10:00
2010-08-12 08:43:30 -07:00
2010-08-12 08:43:30 -07:00
2010-08-12 08:43:30 -07:00
2010-06-24 21:30:09 -07:00
2010-08-18 01:09:01 -04:00
2010-09-09 18:57:23 -07:00
2010-08-06 15:36:47 -05:00
2010-08-04 11:00:45 +02:00
2010-08-12 04:14:05 +01:00
2010-08-18 08:35:46 -04:00
2010-08-18 08:35:48 -04:00
2010-09-09 20:46:30 +02:00
2010-07-12 14:41:40 +02:00
2010-07-19 11:54:16 +02:00
2010-08-11 09:23:22 +02:00
2010-08-11 18:21:02 +02:00
2010-06-16 18:08:13 +02:00
2010-06-23 13:16:38 -07:00
2010-08-09 20:45:05 -07:00
2010-06-22 08:07:01 +02:00
2010-08-10 11:49:21 -07:00
2010-08-12 11:27:58 +02:00
2010-09-09 18:57:24 -07:00
2010-06-29 10:07:09 +02:00
2010-08-02 06:39:44 +03:00
2010-08-01 10:47:00 +03:00
2010-07-06 13:45:24 -04:00
2010-06-16 18:03:15 +02:00
2010-08-09 16:48:45 -04:00
2010-07-14 17:14:00 +10:00
2010-09-09 09:05:06 -07:00
2010-08-11 00:29:47 -04:00
2010-07-02 21:59:08 -07:00
2010-07-05 16:14:52 -06:00
2010-07-05 16:14:25 -06:00
2010-07-31 19:53:06 +08:00
2010-09-15 10:44:00 +02:00
2010-07-19 01:58:48 +02:00
2010-07-19 01:58:48 +02:00
2010-08-04 21:53:17 -07:00
2010-08-09 16:47:27 -04:00
2010-07-22 13:46:21 -07:00
2010-07-23 17:08:41 +04:00
2010-09-08 15:04:10 +02:00
2010-06-16 14:55:35 -07:00
2010-08-09 16:48:44 -04:00
2010-08-18 08:35:47 -04:00
2010-08-06 10:37:02 -04:00
2010-08-11 08:59:02 -07:00