Revision b5d281f6c16dd432b618bdfd36ddba1a58d5b603 authored by Christian Marangi on 19 June 2022, 22:03:51 UTC, committed by Chanwoo Choi on 29 June 2022, 20:11:17 UTC
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: 0ec09ac2cebe ("PM / devfreq: Set the freq_table of devfreq device") Cc: stable@vger.kernel.org Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
1 parent f44b799
File | Mode | Size |
---|---|---|
coresight | ||
postprocess | ||
boottime-trace.rst | -rw-r--r-- | 10.2 KB |
events-kmem.rst | -rw-r--r-- | 5.4 KB |
events-msr.rst | -rw-r--r-- | 783 bytes |
events-nmi.rst | -rw-r--r-- | 1.6 KB |
events-power.rst | -rw-r--r-- | 3.4 KB |
events.rst | -rw-r--r-- | 39.8 KB |
fprobe.rst | -rw-r--r-- | 5.7 KB |
ftrace-design.rst | -rw-r--r-- | 14.7 KB |
ftrace-uses.rst | -rw-r--r-- | 11.9 KB |
ftrace.rst | -rw-r--r-- | 131.0 KB |
function-graph-fold.vim | -rw-r--r-- | 1.3 KB |
histogram-design.rst | -rw-r--r-- | 87.1 KB |
histogram.rst | -rw-r--r-- | 153.6 KB |
hwlat_detector.rst | -rw-r--r-- | 4.0 KB |
index.rst | -rw-r--r-- | 516 bytes |
intel_th.rst | -rw-r--r-- | 6.0 KB |
kprobes.rst | -rw-r--r-- | 29.6 KB |
kprobetrace.rst | -rw-r--r-- | 10.9 KB |
mmiotrace.rst | -rw-r--r-- | 6.8 KB |
osnoise-tracer.rst | -rw-r--r-- | 8.3 KB |
ring-buffer-design.rst | -rw-r--r-- | 30.6 KB |
stm.rst | -rw-r--r-- | 6.6 KB |
sys-t.rst | -rw-r--r-- | 2.1 KB |
timerlat-tracer.rst | -rw-r--r-- | 8.7 KB |
tracepoint-analysis.rst | -rw-r--r-- | 12.1 KB |
tracepoints.rst | -rw-r--r-- | 6.0 KB |
uprobetracer.rst | -rw-r--r-- | 7.2 KB |
user_events.rst | -rw-r--r-- | 6.8 KB |
Computing file changes ...