diff options
-rw-r--r-- | kernel/events/core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 4742909c56e6..fc7c9a85944d 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -10679,7 +10679,7 @@ static int perf_event_init_context(struct task_struct *child, int ctxn) | |||
10679 | ret = inherit_task_group(event, parent, parent_ctx, | 10679 | ret = inherit_task_group(event, parent, parent_ctx, |
10680 | child, ctxn, &inherited_all); | 10680 | child, ctxn, &inherited_all); |
10681 | if (ret) | 10681 | if (ret) |
10682 | break; | 10682 | goto out_unlock; |
10683 | } | 10683 | } |
10684 | 10684 | ||
10685 | /* | 10685 | /* |
@@ -10695,7 +10695,7 @@ static int perf_event_init_context(struct task_struct *child, int ctxn) | |||
10695 | ret = inherit_task_group(event, parent, parent_ctx, | 10695 | ret = inherit_task_group(event, parent, parent_ctx, |
10696 | child, ctxn, &inherited_all); | 10696 | child, ctxn, &inherited_all); |
10697 | if (ret) | 10697 | if (ret) |
10698 | break; | 10698 | goto out_unlock; |
10699 | } | 10699 | } |
10700 | 10700 | ||
10701 | raw_spin_lock_irqsave(&parent_ctx->lock, flags); | 10701 | raw_spin_lock_irqsave(&parent_ctx->lock, flags); |
@@ -10723,6 +10723,7 @@ static int perf_event_init_context(struct task_struct *child, int ctxn) | |||
10723 | } | 10723 | } |
10724 | 10724 | ||
10725 | raw_spin_unlock_irqrestore(&parent_ctx->lock, flags); | 10725 | raw_spin_unlock_irqrestore(&parent_ctx->lock, flags); |
10726 | out_unlock: | ||
10726 | mutex_unlock(&parent_ctx->mutex); | 10727 | mutex_unlock(&parent_ctx->mutex); |
10727 | 10728 | ||
10728 | perf_unpin_context(parent_ctx); | 10729 | perf_unpin_context(parent_ctx); |