aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/events/core.c')
-rw-r--r--kernel/events/core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 56003c6edfd3..fa0b2d4ad83c 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7856,14 +7856,14 @@ static void perf_pmu_rotate_stop(struct pmu *pmu)
7856static void __perf_event_exit_context(void *__info) 7856static void __perf_event_exit_context(void *__info)
7857{ 7857{
7858 struct perf_event_context *ctx = __info; 7858 struct perf_event_context *ctx = __info;
7859 struct perf_event *event, *tmp; 7859 struct perf_event *event;
7860 7860
7861 perf_pmu_rotate_stop(ctx->pmu); 7861 perf_pmu_rotate_stop(ctx->pmu);
7862 7862
7863 list_for_each_entry_safe(event, tmp, &ctx->pinned_groups, group_entry) 7863 rcu_read_lock();
7864 __perf_remove_from_context(event); 7864 list_for_each_entry_rcu(event, &ctx->event_list, event_entry)
7865 list_for_each_entry_safe(event, tmp, &ctx->flexible_groups, group_entry)
7866 __perf_remove_from_context(event); 7865 __perf_remove_from_context(event);
7866 rcu_read_unlock();
7867} 7867}
7868 7868
7869static void perf_event_exit_cpu_context(int cpu) 7869static void perf_event_exit_cpu_context(int cpu)
@@ -7887,11 +7887,11 @@ static void perf_event_exit_cpu(int cpu)
7887{ 7887{
7888 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); 7888 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
7889 7889
7890 perf_event_exit_cpu_context(cpu);
7891
7890 mutex_lock(&swhash->hlist_mutex); 7892 mutex_lock(&swhash->hlist_mutex);
7891 swevent_hlist_release(swhash); 7893 swevent_hlist_release(swhash);
7892 mutex_unlock(&swhash->hlist_mutex); 7894 mutex_unlock(&swhash->hlist_mutex);
7893
7894 perf_event_exit_cpu_context(cpu);
7895} 7895}
7896#else 7896#else
7897static inline void perf_event_exit_cpu(int cpu) { } 7897static inline void perf_event_exit_cpu(int cpu) { }