summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cppc_cpufreq.c
diff options
context:
space:
mode:
authorHenry Martin <bsdhenrymartin@gmail.com>2025-04-08 23:03:53 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-02 07:50:42 +0200
commitea834c90aa7cc80a1b456f7a91432734d5087d16 (patch)
treead0264eda499fac5f5dce6725f0be8c0d95289a6 /drivers/cpufreq/cppc_cpufreq.c
parent1053dcf8a504d4933bb3f73df22bc363298d194b (diff)
cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
[ Upstream commit 484d3f15cc6cbaa52541d6259778e715b2c83c54 ] cpufreq_cpu_get_raw() can return NULL when the target CPU is not present in the policy->cpus mask. scmi_cpufreq_get_rate() does not check for this case, which results in a NULL pointer dereference. Add NULL check after cpufreq_cpu_get_raw() to prevent this issue. Fixes: 99d6bdf33877 ("cpufreq: add support for CPU DVFS based on SCMI message protocol") Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/cpufreq/cppc_cpufreq.c')
0 files changed, 0 insertions, 0 deletions