From: Peter Zijlstra Date: Tue, 22 Nov 2011 10:25:43 +0000 (+0100) Subject: perf: Fix enable_on_exec for sibling events X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b79387ef185af2323594920923cecba5753c3817;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git perf: Fix enable_on_exec for sibling events Deng-Cheng Zhu reported that sibling events that were created disabled with enable_on_exec would never get enabled. Iterate all events instead of the group lists. Reported-by: Deng-Cheng Zhu Tested-by: Deng-Cheng Zhu Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/r/1322048382.14799.41.camel@twins Signed-off-by: Ingo Molnar --- diff --git a/kernel/events/core.c b/kernel/events/core.c index eeda5403590c..3c1541d7a53d 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -2497,13 +2497,7 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx) raw_spin_lock(&ctx->lock); task_ctx_sched_out(ctx); - list_for_each_entry(event, &ctx->pinned_groups, group_entry) { - ret = event_enable_on_exec(event, ctx); - if (ret) - enabled = 1; - } - - list_for_each_entry(event, &ctx->flexible_groups, group_entry) { + list_for_each_entry(event, &ctx->event_list, event_entry) { ret = event_enable_on_exec(event, ctx); if (ret) enabled = 1;