events:core.c: Use built-in RCU list checking
Subsystems (2)
PATCH 1/1 events:core.c: Use built-in RCU list checking
list_for_each_entry_rcu has built-in RCU and lock checking.
Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default.
Signed-off-by Madhuparna Bhowmik <[email protected]>
--- kernel/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/events/core.c +2 -1
@@ -3760,7 +3760,8 @@ static void perf_adjust_freq_unthr_context(struct perf_event_context *ctx,raw_spin_lock (&ctx->lock);perf_pmu_disable (ctx->pmu); -list_for_each_entry_rcu (event, &ctx->event_list, event_entry) { +list_for_each_entry_rcu (event, &ctx->event_list, event_entry, +lockdep_is_held (&ctx->lock)) {if (event->state !=PERF_EVENT_STATE_ACTIVE )continue ;
Signature · 1 line
2.17.1