android_kernel_samsung_a7y1.../drivers/cpufreq
Rafael J. Wysocki 3e5440e3e2 cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown
commit 65650b35133ff20f0c9ef0abd5c3c66dbce3ae57 upstream.

It is incorrect to set the cpufreq syscore shutdown callback pointer
to cpufreq_suspend(), because that function cannot be run in the
syscore stage of system shutdown for two reasons: (a) it may attempt
to carry out actions depending on devices that have already been shut
down at that point and (b) the RCU synchronization carried out by it
may not be able to make progress then.

The latter issue has been present since commit 45975c7d21a1 ("rcu:
Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds"),
but the former one has been there since commit 90de2a4aa9f3 ("cpufreq:
suspend cpufreq governors on shutdown") regardless.

Fix that by dropping cpufreq_syscore_ops altogether and making
device_shutdown() call cpufreq_suspend() directly before shutting
down devices, which is along the lines of what system-wide power
management does.

Fixes: 45975c7d21a1 ("rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds")
Fixes: 90de2a4aa9f3 ("cpufreq: suspend cpufreq governors on shutdown")
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 4.0+ <stable@vger.kernel.org> # 4.0+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 09:27:04 +02:00
..
acpi-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
amd_freq_sensitivity.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
arm_big_little_dt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
arm_big_little.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
arm_big_little.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
at32ap-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blackfin-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cppc_cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_conservative.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_governor_attr_set.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_governor.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_governor.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_interactive.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_ondemand.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_performance.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_powersave.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_stats.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_times.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_userspace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq-dt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq-nforce2.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq.c cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown 2020-04-07 09:27:04 +02:00
cris-artpec3-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cris-etraxfs-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
davinci-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dbx500-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
e_powersaver.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
elanfreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exynos-acme.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exynos-acme.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exynos-ff.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exynos-ufc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exynos-ufc.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exynos5440-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
freq_table.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gx-suspmod.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
highbank-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hisi-acpu-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ia64-acpi-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
imx6q-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
integrator-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel_pstate.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.arm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.powerpc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.x86 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kirkwood-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
longhaul.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
longhaul.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
longrun.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
loongson2_cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ls1x-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
maple-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mt8173-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
omap-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
p4-clockmod.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pasemi-cpufreq.c cpufreq/pasemi: fix use-after-free in pas_cpufreq_cpu_init() 2020-04-06 20:38:49 +02:00
pcc-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pmac32-cpufreq.c cpufreq: pmac32: fix possible object reference leak 2020-04-06 18:19:31 +02:00
pmac64-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
powernow-k6.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
powernow-k7.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
powernow-k7.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
powernow-k8.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
powernow-k8.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
powernv-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ppc_cbe_cpufreq_pervasive.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ppc_cbe_cpufreq_pmi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ppc_cbe_cpufreq.c cpufreq: ppc_cbe: fix possible object reference leak 2020-04-06 18:19:27 +02:00
ppc_cbe_cpufreq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pxa2xx-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pxa3xx-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
qoriq-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s3c24xx-cpufreq-debugfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s3c24xx-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s3c64xx-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s3c2410-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s3c2412-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s3c2416-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s3c2440-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s5pv210-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sa1100-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sa1110-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sc520_freq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scpi-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sfi-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sh-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sparc-us2e-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sparc-us3-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spear-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
speedstep-centrino.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
speedstep-ich.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
speedstep-lib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
speedstep-lib.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
speedstep-smi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tegra20-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tegra124-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
unicore2-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vexpress-spc-cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30