diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 753648cf9af67828c1e9259f3c5b821b1e7c0b2c..dfde9283aec162154b982c191673ced2f5a4b4d6 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -348,8 +348,9 @@ validate_event(struct cpu_hw_events *cpuc, struct perf_event *event) { struct hw_perf_event fake_event = event->hw; + struct pmu *leader_pmu = event->group_leader->pmu; - if (event->pmu != &pmu || event->state <= PERF_EVENT_STATE_OFF) + if (event->pmu != leader_pmu || event->state <= PERF_EVENT_STATE_OFF) return 1; return armpmu->get_event_idx(cpuc, &fake_event) >= 0;