diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/events/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index b8785e26ee1c..68c8017de969 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -5715,6 +5715,7 @@ struct pmu *perf_init_event(struct perf_event *event) | |||
5715 | pmu = idr_find(&pmu_idr, event->attr.type); | 5715 | pmu = idr_find(&pmu_idr, event->attr.type); |
5716 | rcu_read_unlock(); | 5716 | rcu_read_unlock(); |
5717 | if (pmu) { | 5717 | if (pmu) { |
5718 | event->pmu = pmu; | ||
5718 | ret = pmu->event_init(event); | 5719 | ret = pmu->event_init(event); |
5719 | if (ret) | 5720 | if (ret) |
5720 | pmu = ERR_PTR(ret); | 5721 | pmu = ERR_PTR(ret); |
@@ -5722,6 +5723,7 @@ struct pmu *perf_init_event(struct perf_event *event) | |||
5722 | } | 5723 | } |
5723 | 5724 | ||
5724 | list_for_each_entry_rcu(pmu, &pmus, entry) { | 5725 | list_for_each_entry_rcu(pmu, &pmus, entry) { |
5726 | event->pmu = pmu; | ||
5725 | ret = pmu->event_init(event); | 5727 | ret = pmu->event_init(event); |
5726 | if (!ret) | 5728 | if (!ret) |
5727 | goto unlock; | 5729 | goto unlock; |
@@ -5848,8 +5850,6 @@ done: | |||
5848 | return ERR_PTR(err); | 5850 | return ERR_PTR(err); |
5849 | } | 5851 | } |
5850 | 5852 | ||
5851 | event->pmu = pmu; | ||
5852 | |||
5853 | if (!event->parent) { | 5853 | if (!event->parent) { |
5854 | if (event->attach_state & PERF_ATTACH_TASK) | 5854 | if (event->attach_state & PERF_ATTACH_TASK) |
5855 | jump_label_inc(&perf_sched_events); | 5855 | jump_label_inc(&perf_sched_events); |