Re: [PATCH 2/2] cpufreq: stats: Fix concurrency issues while resetting stats

2019-02-04 Thread Matthias Kaehlcke
On Fri, Feb 01, 2019 at 11:45:45AM +0530, Viresh Kumar wrote: > It is possible for cpufreq_stats_clear_table() and > cpufreq_stats_record_transition() to get called concurrently and they > will try to update same variables simultaneously and may lead to > corruption of data. > > Prevent that with

[PATCH 2/2] cpufreq: stats: Fix concurrency issues while resetting stats

2019-01-31 Thread Viresh Kumar
It is possible for cpufreq_stats_clear_table() and cpufreq_stats_record_transition() to get called concurrently and they will try to update same variables simultaneously and may lead to corruption of data. Prevent that with the help of existing spinlock. Signed-off-by: Viresh Kumar --- drivers/