Message ID | 20180316131741.3svgr64yibc6vsid@lakrids.cambridge.arm.com |
---|---|
State | New |
Headers | show |
Series | perf/core: clear sibling list of detached events (was "Re: [PATCH] perf: Fix sibling iteration") | expand |
On Fri, Mar 16, 2018 at 01:17:41PM +0000, Mark Rutland wrote: > I've given this 50 boots with the 0day scripts, and no explosions so far > (with 5 boots where a leader had an empty group_node). I've been running this for almost 2 hours now, and no splats either. I'll let it run for another few hours, just in case. Thanks Mark!
diff --git a/kernel/events/core.c b/kernel/events/core.c index 9a07bbe66451..627814e1820d 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -1917,12 +1917,12 @@ static void perf_group_detach(struct perf_event *event) list_for_each_entry_safe(sibling, tmp, &event->sibling_list, sibling_list) { sibling->group_leader = sibling; + list_del_init(&sibling->sibling_list); /* Inherit group flags from the previous leader */ sibling->group_caps = event->group_caps; if (!RB_EMPTY_NODE(&event->group_node)) { - list_del_init(&sibling->sibling_list); add_event_to_groups(sibling, event->ctx); }