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 |
---|---|---|
Kconfig | -rw-r--r-- | 4.3 KB |
Makefile | -rw-r--r-- | 823 bytes |
font_10x18.c | -rw-r--r-- | 140.7 KB |
font_6x10.c | -rw-r--r-- | 60.9 KB |
font_6x11.c | -rw-r--r-- | 66.7 KB |
font_6x8.c | -rw-r--r-- | 45.9 KB |
font_7x14.c | -rw-r--r-- | 79.3 KB |
font_8x16.c | -rw-r--r-- | 94.0 KB |
font_8x8.c | -rw-r--r-- | 49.9 KB |
font_acorn_8x8.c | -rw-r--r-- | 15.8 KB |
font_mini_4x6.c | -rw-r--r-- | 54.6 KB |
font_pearl_8x8.c | -rw-r--r-- | 54.7 KB |
font_sun12x22.c | -rw-r--r-- | 181.6 KB |
font_sun8x16.c | -rw-r--r-- | 22.1 KB |
font_ter16x32.c | -rw-r--r-- | 100.8 KB |
fonts.c | -rw-r--r-- | 3.0 KB |
Computing file changes ...