lkml.org 
[lkml]   [2019]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/4] perf: Allow using AUX data in perf samples
On Tue, Oct 22, 2019 at 12:58:09PM +0300, Alexander Shishkin wrote:
> @@ -11213,6 +11367,9 @@ SYSCALL_DEFINE5(perf_event_open,
> if (event->attr.aux_output && !perf_get_aux_event(event, group_leader))
> goto err_locked;
>
> + if (event->attr.aux_sample_size && !perf_get_aux_event(event, group_leader))
> + goto err_locked;
> +

Either aux_sample_size and aux_output are mutually exclusive, or you're
leaking a refcount on group_leader. The first wants a check, the second
wants error path fixes.

> /*
> * Must be under the same ctx::mutex as perf_install_in_context(),
> * because we need to serialize with concurrent event creation.

\
 
 \ /
  Last update: 2019-10-24 16:02    [W:0.052 / U:1.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site