[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170828192307.5mxis44vg2m5ph3a@hirez.programming.kicks-ass.net>
Date: Mon, 28 Aug 2017 21:23:07 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
David Ahern <dsahern@...il.com>,
Andi Kleen <andi@...stfloor.org>,
Mark Rutland <mark.rutland@....com>
Subject: Re: [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@....com>
> Signed-off-by: Jiri Olsa <jolsa@...nel.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.
Powered by blists - more mailing lists