summaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-03-27 09:46:03 +0100
committerIngo Molnar <mingo@kernel.org>2015-03-27 09:46:03 +0100
commit072e5a1cfabca7276744d24726e094d85721df5c (patch)
treec7237fa143f72273aa8a8179f741c24b9072001c /kernel/events
parentperf/x86/intel: Add INST_RETIRED.ALL workarounds (diff)
parentperf: Fix irq_work 'tail' recursion (diff)
downloadlinux-072e5a1cfabca7276744d24726e094d85721df5c.tar.xz
linux-072e5a1cfabca7276744d24726e094d85721df5c.zip
Merge branch 'perf/urgent' into perf/core, to pick up fixes and to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 8bb20cc39a92..9a5f339a0e2d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3610,7 +3610,7 @@ static void put_event(struct perf_event *event)
ctx = perf_event_ctx_lock_nested(event, SINGLE_DEPTH_NESTING);
WARN_ON_ONCE(ctx->parent_ctx);
perf_remove_from_context(event, true);
- mutex_unlock(&ctx->mutex);
+ perf_event_ctx_unlock(event, ctx);
_free_event(event);
}
@@ -4593,6 +4593,13 @@ static void perf_pending_event(struct irq_work *entry)
{
struct perf_event *event = container_of(entry,
struct perf_event, pending);
+ int rctx;
+
+ rctx = perf_swevent_get_recursion_context();
+ /*
+ * If we 'fail' here, that's OK, it means recursion is already disabled
+ * and we won't recurse 'further'.
+ */
if (event->pending_disable) {
event->pending_disable = 0;
@@ -4603,6 +4610,9 @@ static void perf_pending_event(struct irq_work *entry)
event->pending_wakeup = 0;
perf_event_wakeup(event);
}
+
+ if (rctx >= 0)
+ perf_swevent_put_recursion_context(rctx);
}
/*