perf_counter: Initialize ->oncpu properly
[linux-2.6-block.git] / kernel / perf_counter.c
index 070f92d3232a88e68068600fcf2dfac00c505527..367299f91aaff21fe9948035a43f27bd5ee7a4b5 100644 (file)
@@ -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;