diff options
-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 ed50b0943213..a62d142ad498 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -7431,7 +7431,7 @@ __perf_event_exit_task(struct perf_event *child_event, | |||
7431 | 7431 | ||
7432 | static void perf_event_exit_task_context(struct task_struct *child, int ctxn) | 7432 | static void perf_event_exit_task_context(struct task_struct *child, int ctxn) |
7433 | { | 7433 | { |
7434 | struct perf_event *child_event; | 7434 | struct perf_event *child_event, *next; |
7435 | struct perf_event_context *child_ctx; | 7435 | struct perf_event_context *child_ctx; |
7436 | unsigned long flags; | 7436 | unsigned long flags; |
7437 | 7437 | ||
@@ -7485,7 +7485,7 @@ static void perf_event_exit_task_context(struct task_struct *child, int ctxn) | |||
7485 | */ | 7485 | */ |
7486 | mutex_lock(&child_ctx->mutex); | 7486 | mutex_lock(&child_ctx->mutex); |
7487 | 7487 | ||
7488 | list_for_each_entry_rcu(child_event, &child_ctx->event_list, event_entry) | 7488 | list_for_each_entry_safe(child_event, next, &child_ctx->event_list, event_entry) |
7489 | __perf_event_exit_task(child_event, child_ctx, child); | 7489 | __perf_event_exit_task(child_event, child_ctx, child); |
7490 | 7490 | ||
7491 | mutex_unlock(&child_ctx->mutex); | 7491 | mutex_unlock(&child_ctx->mutex); |