projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cde8e88
)
perf: Fix free_event()
author
Peter Zijlstra
<a.p.zijlstra@chello.nl>
Mon, 13 Sep 2010 09:15:58 +0000
(11:15 +0200)
committer
Ingo Molnar
<mingo@elte.hu>
Mon, 13 Sep 2010 15:08:42 +0000
(17:08 +0200)
With the context rework stuff we can actually end up freeing an event
before it gets attached to a context.
Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/perf_event.c
b/kernel/perf_event.c
index bc46bff696206851925ab18eb259ea23eab9b220..440f9ca067b2269b3fe9d3178ccda8e561a305f1 100644
(file)
--- a/
kernel/perf_event.c
+++ b/
kernel/perf_event.c
@@
-2150,7
+2150,9
@@
static void free_event(struct perf_event *event)
if (event->destroy)
event->destroy(event);
- put_ctx(event->ctx);
+ if (event->ctx)
+ put_ctx(event->ctx);
+
call_rcu(&event->rcu_head, free_event_rcu);
}