cpufreq: Fix locking issues with governors
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 29 Jun 2020 08:24:58 +0000 (13:54 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 2 Jul 2020 11:02:55 +0000 (13:02 +0200)
commit8cc46ae565c393f77417cb9530b1265eb50f5d2e
tree0ba5626d4dc3854258ec2e2399a5bfe4f7fcbd56
parentf473bf398bf1ed42b1bdbc5206a804d8d3140a2d
cpufreq: Fix locking issues with governors

The locking around governors handling isn't adequate currently.

The list of governors should never be traversed without the locking
in place. Also governor modules must not be removed while the code
in them is still in use.

Reported-by: Quentin Perret <qperret@google.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: All applicable <stable@vger.kernel.org>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c