[PATCH v2 0/2] cpufreq: acpi-cpufreq: fix P-state index mismatch in freq lookups

From: lirongqing

Date: Thu Aug 13 2026 - 05:11:28 EST


From: Li RongQing <lirongqing@xxxxxxxxx>

policy->freq_table is built with duplicate _PSS frequencies dropped, so it
no longer lines up positionally with perf->states[]; the original P-state
index is kept in freq_table[].driver_data. extract_io() and
get_cur_freq_on_cpu() indexed freq_table[] with a perf->states[] index
anyway, which can return the frequency of a wrong P-state.

Changes since v1:
- Reword patch 1: v1 described it as an out-of-bounds read, which is wrong;
it is an index-mismatch / wrong-result bug, not a memory-safety issue.
- Add patch 2 for get_cur_freq_on_cpu().
- Add Fixes: tags (not exact, but reasonable backport targets).

Li RongQing (2):
cpufreq: acpi-cpufreq: fix P-state index mismatch in extract_io()
cpufreq: acpi-cpufreq: fix P-state index mismatch in
get_cur_freq_on_cpu()

drivers/cpufreq/acpi-cpufreq.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

--
2.9.4