aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/perf_event.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index c16158c77dfd..64507eaa2d9e 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -5616,8 +5616,13 @@ SYSCALL_DEFINE5(perf_event_open,
5616 } 5616 }
5617 } 5617 }
5618 5618
5619 if (pid != -1) 5619 if (pid != -1) {
5620 task = find_lively_task_by_vpid(pid); 5620 task = find_lively_task_by_vpid(pid);
5621 if (IS_ERR(task)) {
5622 err = PTR_ERR(task);
5623 goto err_group_fd;
5624 }
5625 }
5621 5626
5622 /* 5627 /*
5623 * Get the target context (task or percpu): 5628 * Get the target context (task or percpu):