perf_events: Fix invalid pointer when pid is invalid
perf_events: Fix invalid pointer when pid is invalid

This patch fixes an error in perf_event_open() when the pid
provided by the user is invalid. find_lively_task_by_vpid()
does not return NULL on error but an error code. Without the
fix the error code was silently passed to find_get_context()
which would eventually cause a invalid pointer dereference.

Signed-off-by: Stephane Eranian <f199ae9781930a5b94b284ca2f471140752002a7@google.com>
Cc: 3fddac958924aef220f202ca567388ddab3f14a8@infradead.org
Cc: 19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org
Cc: fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net
Cc: e8a1bf9163cb25e93cfd6540f223b3872ea7ee55@gmail.com
Cc: 1ea69d7141ad48c4fb08fa338ed4b637bf010d83@lists.sf.net
Cc: f199ae9781930a5b94b284ca2f471140752002a7@gmail.com
Cc: 22a70fd9773e4de05b12c05075e9bcd605577f4d@amd.com
LKML-Reference: <f05655956063009b4181e648029080f0018b6d16@mx.google.com>
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas