aboutsummaryrefslogtreecommitdiff
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-05-07 11:30:29 +0200
committerIngo Molnar <mingo@elte.hu>2010-05-07 11:30:30 +0200
commitcce913178118b0b36742eb7544c2b38a0c957ee7 (patch)
tree25a6d7b4e01fea2932e6e2962a75f7a3d8c19a4f /kernel/perf_event.c
parentd9f599e1e6d019968b35d2dc63074b9e8964fa69 (diff)
parent4fd38e4595e2f6c9d27732c042a0e16b2753049c (diff)
Merge branch 'perf/urgent' into perf/core
Merge reason: Resolve patch dependency Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 9dbe8cdaf14..49d8be5a45e 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -342,6 +342,9 @@ list_del_event(struct perf_event *event, struct perf_event_context *ctx)
if (event->state > PERF_EVENT_STATE_OFF)
event->state = PERF_EVENT_STATE_OFF;
+ if (event->state > PERF_EVENT_STATE_FREE)
+ return;
+
/*
* If this was a group event with sibling events then
* upgrade the siblings to singleton events by adding them
@@ -1861,6 +1864,8 @@ int perf_event_release_kernel(struct perf_event *event)
{
struct perf_event_context *ctx = event->ctx;
+ event->state = PERF_EVENT_STATE_FREE;
+
WARN_ON_ONCE(ctx->parent_ctx);
mutex_lock(&ctx->mutex);
perf_event_remove_from_context(event);
@@ -5021,7 +5026,7 @@ err_fput_free_put_context:
err_free_put_context:
if (err < 0)
- kfree(event);
+ free_event(event);
err_put_context:
if (err < 0)