diff options
author | Peter Boonstoppel <pboonstoppel@nvidia.com> | 2012-02-28 14:05:50 -0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-03-06 21:27:15 -0800 |
commit | d7700421d4b01eaf300be777f27461c47a266158 (patch) | |
tree | b108191d7ecead1f8185a787b1045a28ec579fbc /drivers/cpufreq | |
parent | 79cd1f881bc4aebd94063ab4bbfd7c97c1cd70ac (diff) |
cpufreq: ondemand: Prevent sysfs create race
Protecting sysfs_remove_group() in CPUFREQ_GOV_STOP with dbs_mutex
Bug 946462
Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-on: http://git-master/r/86426
(cherry picked from commit d1131158e2ad4d5ccc53b3008743c29385650d86)
Change-Id: Iae810e83eaa6f0f7d970b56238cbcb61118af610
Reviewed-on: http://git-master/r/87392
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 891360edecdd..a9442a349bbd 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -690,11 +690,10 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, mutex_lock(&dbs_mutex); mutex_destroy(&this_dbs_info->timer_mutex); dbs_enable--; - mutex_unlock(&dbs_mutex); if (!dbs_enable) sysfs_remove_group(cpufreq_global_kobject, &dbs_attr_group); - + mutex_unlock(&dbs_mutex); break; case CPUFREQ_GOV_LIMITS: |