From: Paul Mackerras Date: Mon, 11 May 2009 05:50:21 +0000 (+1000) Subject: perf_counter: call atomic64_set for counter->count X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=615a3f1e055ac9b0ae74e1f935a12ea2cfe2a2ad;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf_counter: call atomic64_set for counter->count A compile warning triggered because we are calling atomic_set(&counter->count). But since counter->count is an atomic64_t, we have to use atomic64_set. So the count can be set short, resulting in the reset ioctl only resetting the low word. [ Impact: clear counter properly during the reset ioctl ] Signed-off-by: Paul Mackerras Cc: Peter Zijlstra Cc: Corey Ashford LKML-Reference: <18951.48285.270311.981806@drongo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar --- diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index 7373b96bc36c..5ea0240adab2 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c @@ -1281,7 +1281,7 @@ static unsigned int perf_poll(struct file *file, poll_table *wait) static void perf_counter_reset(struct perf_counter *counter) { (void)perf_counter_read(counter); - atomic_set(&counter->count, 0); + atomic64_set(&counter->count, 0); perf_counter_update_userpage(counter); }