diff options
-rw-r--r-- | kernel/perf_event.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index e50543db642..e491fb08793 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -4767,9 +4767,7 @@ int perf_event_init_task(struct task_struct *child) * We dont have to disable NMIs - we are only looking at * the list, not manipulating it: */ - list_for_each_entry_rcu(event, &parent_ctx->event_list, event_entry) { - if (event != event->group_leader) - continue; + list_for_each_entry(event, &parent_ctx->group_list, group_entry) { if (!event->attr.inherit) { inherited_all = 0; |