aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_counter.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-03-19 15:26:11 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-06 03:30:15 -0400
commit01ef09d9ffb5ce9f8d62d1e5206da3d5ca612acc (patch)
tree7259d26f86fa93e7d50f9d886f62b2a3054aa4c3 /kernel/perf_counter.c
parentb6c5a71da1477d261bc36254fe1f20d32b57598d (diff)
perf_counter: fix uninitialized usage of event_list
Impact: fix boot crash When doing the generic context switch event I ran into some early boot hangs, which were caused by inf func recursion (event, fault, event, fault). I eventually tracked it down to event_list not being initialized at the time of the first event. Fix this. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Steven Rostedt <rostedt@goodmis.org> Orig-LKML-Reference: <20090319194233.195392657@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r--kernel/perf_counter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index b39456ad74a1..4c4e9eb37ab0 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -1506,7 +1506,7 @@ static void perf_swcounter_ctx_event(struct perf_counter_context *ctx,
1506{ 1506{
1507 struct perf_counter *counter; 1507 struct perf_counter *counter;
1508 1508
1509 if (list_empty(&ctx->event_list)) 1509 if (system_state != SYSTEM_RUNNING || list_empty(&ctx->event_list))
1510 return; 1510 return;
1511 1511
1512 rcu_read_lock(); 1512 rcu_read_lock();