diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-26 08:10:00 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-26 09:54:13 +0200 |
commit | 329d876d6fd326109f191ae0fb2798b8834fb70b (patch) | |
tree | 9e8a071a9c89be06a3b6dd526ec42f08eca16ae3 /kernel/perf_counter.c | |
parent | perf_counter, x86: Make NMI lockups more robust (diff) | |
download | linux-329d876d6fd326109f191ae0fb2798b8834fb70b.tar.xz linux-329d876d6fd326109f191ae0fb2798b8834fb70b.zip |
perf_counter: Initialize ->oncpu properly
This shouldnt matter normally (and i have not seen any
misbehavior), because active counters always have a
proper ->oncpu value - but nevertheless initialize the
field properly to -1.
[ Impact: cleanup ]
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r-- | kernel/perf_counter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index 070f92d3232a..367299f91aaf 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c @@ -3122,6 +3122,8 @@ perf_counter_alloc(struct perf_counter_hw_event *hw_event, counter->group_leader = group_leader; counter->pmu = NULL; counter->ctx = ctx; + counter->oncpu = -1; + get_ctx(ctx); counter->state = PERF_COUNTER_STATE_INACTIVE; |