Commit 5bfdf472 authored by Anastasia Belova's avatar Anastasia Belova Committed by Liao Chen
Browse files

cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value

mainline inclusion
from mainline-v6.9-rc1
commit f661017e6d326ee187db24194cabb013d81bc2a6
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9N6Q0
CVE: CVE-2024-27051

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f661017e6d326ee187db24194cabb013d81bc2a6



--------------------------------

cpufreq_cpu_get may return NULL. To avoid NULL-dereference check it
and return 0 in case of error.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: de322e08 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs")
Signed-off-by: default avatarAnastasia Belova <abelova@astralinux.ru>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Conflicts:
	drivers/cpufreq/brcmstb-avs-cpufreq.c
Signed-off-by: default avatarLiao Chen <liaochen4@huawei.com>
parent 48d72040
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment