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 |
---|---|---|
index.rst | -rw-r--r-- | 367 bytes |
leds-blinkm.rst | -rw-r--r-- | 2.0 KB |
leds-class-flash.rst | -rw-r--r-- | 3.2 KB |
leds-class-multicolor.rst | -rw-r--r-- | 3.0 KB |
leds-class.rst | -rw-r--r-- | 7.2 KB |
leds-el15203000.rst | -rw-r--r-- | 4.3 KB |
leds-lm3556.rst | -rw-r--r-- | 3.0 KB |
leds-lp3944.rst | -rw-r--r-- | 1.5 KB |
leds-lp5521.rst | -rw-r--r-- | 2.9 KB |
leds-lp5523.rst | -rw-r--r-- | 3.4 KB |
leds-lp5562.rst | -rw-r--r-- | 3.6 KB |
leds-lp55xx.rst | -rw-r--r-- | 6.7 KB |
leds-mlxcpld.rst | -rw-r--r-- | 2.4 KB |
leds-qcom-lpg.rst | -rw-r--r-- | 2.9 KB |
leds-sc27xx.rst | -rw-r--r-- | 989 bytes |
ledtrig-oneshot.rst | -rw-r--r-- | 1.5 KB |
ledtrig-transient.rst | -rw-r--r-- | 6.9 KB |
ledtrig-usbport.rst | -rw-r--r-- | 1.4 KB |
uleds.rst | -rw-r--r-- | 1.2 KB |
well-known-leds.txt | -rw-r--r-- | 2.3 KB |
Computing file changes ...