]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "cpufreq: Fix possible race in cpufreq online error path"
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 9 May 2022 03:57:37 +0000 (09:27 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 9 May 2022 16:51:54 +0000 (18:51 +0200)
commit3623e191c4a7c0b81f3ec7cb58911a1812a82b01
tree01787975f47c78623b01234abf4c9a5b1934cbf9
parent527b0e73c3b32272cba5b3360eb588bc8f6c2e86
Revert "cpufreq: Fix possible race in cpufreq online error path"

This reverts commit 60e2c271567898a9d4054eb1e59f2321ec08ee0b.

The commit tried to fix a possible real bug but it made it even worse.
The fix was simply buggy as now an error out to out_offline_policy or
out_exit_policy will try to release a semaphore which was never taken in
the first place. This works fine only if we failed late, i.e. via
out_destroy_policy.

Fixes: 60e2c2715678 ("cpufreq: Fix possible race in cpufreq online error path")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c