Skip to content

Commit cfbed9b

Browse files
committed
Revert "cpufreq: Fix governor module removal race"
This reverts commit 0049457 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>
1 parent a99aaec commit cfbed9b

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎drivers/cpufreq/cpufreq.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
631631
*governor = t;
632632
err = 0;
633633
}
634-
if (t && !try_module_get(t->owner))
635-
t = NULL;
636634

637635
mutex_unlock(&cpufreq_governor_mutex);
638636
}
@@ -761,10 +759,6 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
761759
return -EINVAL;
762760

763761
ret = cpufreq_set_policy(policy, &new_policy);
764-
765-
if (new_policy.governor)
766-
module_put(new_policy.governor->owner);
767-
768762
return ret ? ret : count;
769763
}
770764

0 commit comments

Comments
 (0)