OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46ce0fe
)
perf: Fix perf_event_init_context()
author
Peter Zijlstra
<peterz@infradead.org>
Mon, 5 May 2014 17:12:20 +0000
(19:12 +0200)
committer
Ingo Molnar
<mingo@kernel.org>
Wed, 7 May 2014 09:33:15 +0000
(11:33 +0200)
perf_pin_task_context() can return NULL but perf_event_init_context()
assumes it will not, correct this.
Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Link:
http://lkml.kernel.org/r/20140505171428.GU26782@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c
patch
|
blob
|
history
diff --git
a/kernel/events/core.c
b/kernel/events/core.c
index
ea899e2
..
7123284
100644
(file)
--- a/
kernel/events/core.c
+++ b/
kernel/events/core.c
@@
-7729,6
+7729,8
@@
int perf_event_init_context(struct task_struct *child, int ctxn)
* swapped under us.
*/
parent_ctx = perf_pin_task_context(parent, ctxn);
+ if (!parent_ctx)
+ return 0;
/*
* No need to check if parent_ctx != NULL here; since we saw