aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-05-07 05:30:29 -0400
committerIngo Molnar <mingo@elte.hu>2010-05-07 05:30:30 -0400
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 9dbe8cdaf145..49d8be5a45e3 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)
342 if (event->state > PERF_EVENT_STATE_OFF) 342 if (event->state > PERF_EVENT_STATE_OFF)
343 event->state = PERF_EVENT_STATE_OFF; 343 event->state = PERF_EVENT_STATE_OFF;
344 344
345 if (event->state > PERF_EVENT_STATE_FREE)
346 return;
347
345 /* 348 /*
346 * If this was a group event with sibling events then 349 * If this was a group event with sibling events then
347 * upgrade the siblings to singleton events by adding them 350 * upgrade the siblings to singleton events by adding them
@@ -1861,6 +1864,8 @@ int perf_event_release_kernel(struct perf_event *event)
1861{ 1864{
1862 struct perf_event_context *ctx = event->ctx; 1865 struct perf_event_context *ctx = event->ctx;
1863 1866
1867 event->state = PERF_EVENT_STATE_FREE;
1868
1864 WARN_ON_ONCE(ctx->parent_ctx); 1869 WARN_ON_ONCE(ctx->parent_ctx);
1865 mutex_lock(&ctx->mutex); 1870 mutex_lock(&ctx->mutex);
1866 perf_event_remove_from_context(event); 1871 perf_event_remove_from_context(event);
@@ -5021,7 +5026,7 @@ err_fput_free_put_context:
5021 5026
5022err_free_put_context: 5027err_free_put_context:
5023 if (err < 0) 5028 if (err < 0)
5024 kfree(event); 5029 free_event(event);
5025 5030
5026err_put_context: 5031err_put_context:
5027 if (err < 0) 5032 if (err < 0)