[lvc-project] [PATCH v2] cppc_cpufreq: Fix possible null pointer dereference

Viresh Kumar viresh.kumar at linaro.org
Fri Apr 19 09:39:55 MSK 2024


On 08-04-24, 12:35, Aleksandr Mishin wrote:
> cppc_cpufreq_get_rate() and hisi_cppc_cpufreq_get_rate() can be called from
> different places with various parameters. So cpufreq_cpu_get() can return
> null as 'policy' in some circumstances.
> Fix this bug by adding null return check.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: a28b2bfc099c ("cppc_cpufreq: replace per-cpu data array with a list")
> Signed-off-by: Aleksandr Mishin <amishin at t-argos.ru>
> ---
> v2: Fix mixed declarations
> 
>  drivers/cpufreq/cppc_cpufreq.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)

Applied. Thanks.

-- 
viresh



More information about the lvc-project mailing list