|
@@ -10679,7 +10679,7 @@ static int perf_event_init_context(struct task_struct *child, int ctxn)
|
|
|
ret = inherit_task_group(event, parent, parent_ctx,
|
|
|
child, ctxn, &inherited_all);
|
|
|
if (ret)
|
|
|
- break;
|
|
|
+ goto out_unlock;
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -10695,7 +10695,7 @@ static int perf_event_init_context(struct task_struct *child, int ctxn)
|
|
|
ret = inherit_task_group(event, parent, parent_ctx,
|
|
|
child, ctxn, &inherited_all);
|
|
|
if (ret)
|
|
|
- break;
|
|
|
+ goto out_unlock;
|
|
|
}
|
|
|
|
|
|
raw_spin_lock_irqsave(&parent_ctx->lock, flags);
|
|
@@ -10723,6 +10723,7 @@ static int perf_event_init_context(struct task_struct *child, int ctxn)
|
|
|
}
|
|
|
|
|
|
raw_spin_unlock_irqrestore(&parent_ctx->lock, flags);
|
|
|
+out_unlock:
|
|
|
mutex_unlock(&parent_ctx->mutex);
|
|
|
|
|
|
perf_unpin_context(parent_ctx);
|