lkml.org 
[lkml]   [2017]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/10] perf: Fix leader for removed sibling event in perf_group_detach
On Thu, Aug 24, 2017 at 06:27:29PM +0200, Jiri Olsa wrote:
> Mark reported warning in x86_perf_event_update caused
> by reading unscheduled leader of an event that was
> already removed from the group.
>
> As he pointed out we don't properly reset event's leader
> once it's been detached from the group and he posted the
> attached fix.
>
> [1] https://marc.info/?l=linux-kernel&m=150238662928203&w=2
>
> Originally-From: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> kernel/events/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index d704e23914bf..30e30e94ea32 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -1727,6 +1727,7 @@ static void perf_group_detach(struct perf_event *event)
> if (event->group_leader != event) {
> list_del_init(&event->group_entry);
> event->group_leader->nr_siblings--;
> + event->group_leader = event;
> goto out;
> }

No, I think this breaks other things... but I again forgot what. The
original issue he reported is fixed by patch:

2bcb88eb04d3 ("perf/core: fix group {cpu,task} validation")

Also by Mark.

\
 
 \ /
  Last update: 2017-08-28 21:24    [W:0.170 / U:2.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site