diff options
author | Jan Beulich <JBeulich@novell.com> | 2010-07-06 11:09:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-02 10:29:20 -0700 |
commit | 0c7066ca14c6ac8986510ba5bd946b0b50373d84 (patch) | |
tree | 060674387285a9a73bc4589bdd4fbd6ffc39f76e /kernel/perf_event.c | |
parent | cbed49406bb192d2d87a8a88c757f0bfaddb59de (diff) |
fix mis-applied upstream commit ac9721f3f54b27a16c7e1afb2481e7ee95a70318
For some reason one of the changes to sys_perf_event_open() got
mis-applied, thus breaking (at least) error handling paths (pointed
out by means of a compiler warning).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index a2446518c9ce..2357b19b2451 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -4870,6 +4870,15 @@ SYSCALL_DEFINE5(perf_event_open, if (event_fd < 0) return event_fd; + /* + * Get the target context (task or percpu): + */ + ctx = find_get_context(pid, cpu); + if (IS_ERR(ctx)) { + err = PTR_ERR(ctx); + goto err_fd; + } + if (group_fd != -1) { group_leader = perf_fget_light(group_fd, &fput_needed); if (IS_ERR(group_leader)) { @@ -4884,15 +4893,6 @@ SYSCALL_DEFINE5(perf_event_open, } /* - * Get the target context (task or percpu): - */ - ctx = find_get_context(pid, cpu); - if (IS_ERR(ctx)) { - err = PTR_ERR(ctx); - goto err_fd; - } - - /* * Look up the group leader (we will attach this event to it): */ if (group_leader) { |