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.rutl...@arm.com> Signed-off-by: Jiri Olsa <jo...@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; } -- 2.9.5