cpufreq: remove race while accessing cur_policy
authorBibek Basu <bbasu@nvidia.com>
Fri, 9 May 2014 11:40:35 +0000 (16:40 +0530)
committerMatthew Pedro <mapedro@nvidia.com>
Tue, 13 May 2014 15:15:07 +0000 (08:15 -0700)
commit893243039ee4785099603dac1f3221311e3c219f
treee841c27ab0afc575da50267d9d3b08204d62bc85
parent2929886db14e9d2ac0e75b282126397970fbf9c9
cpufreq: remove race while accessing cur_policy

While accessing cur_policy during executing events
CPUFREQ_GOV_START, CPUFREQ_GOV_STOP, CPUFREQ_GOV_LIMITS
same mutex lock is not taken, dbs_data->mutex, which leads
to race and data corruption while running continious suspend
resume test.

Bug 1455519

Change-Id: I6b385578c791648681746b749d33f671d00154f3
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/407589
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/cpufreq/cpufreq_governor.c