diff options
-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; |