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:Anastasia Belova <abelova@astralinux.ru> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Conflicts: drivers/cpufreq/brcmstb-avs-cpufreq.c Signed-off-by:
Liao Chen <liaochen4@huawei.com>
Loading
Please sign in to comment