mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 23:34:05 +08:00
b5d281f6c1
On a devfreq PROBE_DEFER, the freq_table in the driver profile struct,
is never reset and may be leaved in an undefined state.
This comes from the fact that we store the freq_table in the driver
profile struct that is commonly defined as static and not reset on
PROBE_DEFER.
We currently skip the reinit of the freq_table if we found
it's already defined since a driver may declare his own freq_table.
This logic is flawed in the case devfreq core generate a freq_table, set
it in the profile struct and then PROBE_DEFER, freeing the freq_table.
In this case devfreq will found a NOT NULL freq_table that has been
freed, skip the freq_table generation and probe the driver based on the
wrong table.
To fix this and correctly handle PROBE_DEFER, use a local freq_table and
max_state in the devfreq struct and never modify the freq_table present
in the profile struct if it does provide it.
Fixes:
|
||
---|---|---|
.. | ||
event | ||
devfreq-event.c | ||
devfreq.c | ||
exynos-bus.c | ||
governor_passive.c | ||
governor_performance.c | ||
governor_powersave.c | ||
governor_simpleondemand.c | ||
governor_userspace.c | ||
governor.h | ||
imx8m-ddrc.c | ||
imx-bus.c | ||
Kconfig | ||
Makefile | ||
rk3399_dmc.c | ||
sun8i-a33-mbus.c | ||
tegra30-devfreq.c |