Skip to content

Commit

Permalink
Revert "cpufreq: Fix governor module removal race"
Browse files Browse the repository at this point in the history
This reverts commit a853301 which was
commit a8b149d upstream.

The backport was not correct, so just drop it entirely.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed Apr 8, 2018
1 parent 2dae606 commit f4c3608
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
*governor = t;
err = 0;
}
if (t && !try_module_get(t->owner))
t = NULL;

mutex_unlock(&cpufreq_governor_mutex);
}
Expand Down Expand Up @@ -767,10 +765,6 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
return -EINVAL;

ret = cpufreq_set_policy(policy, &new_policy);

if (new_policy.governor)
module_put(new_policy.governor->owner);

return ret ? ret : count;
}

Expand Down

0 comments on commit f4c3608

Please sign in to comment.