diff --git a/kernel/events/core.c b/kernel/events/core.c index 819ffc006d673c60528ccf582733a49500b4a373..0de199729f04f88fbac802319e6d774055b9d80b 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -1678,6 +1678,8 @@ event_sched_in(struct perf_event *event, u64 tstamp = perf_event_time(event); int ret = 0; + lockdep_assert_held(&ctx->lock); + if (event->state <= PERF_EVENT_STATE_OFF) return 0;