Commit 1053dcf8 authored by Henry Martin's avatar Henry Martin Committed by Greg Kroah-Hartman
Browse files

cpufreq: apple-soc: Fix null-ptr-deref in apple_soc_cpufreq_get_rate()



[ Upstream commit 9992649f ]

cpufreq_cpu_get_raw() can return NULL when the target CPU is not present
in the policy->cpus mask. apple_soc_cpufreq_get_rate() does not check
for this case, which results in a NULL pointer dereference.

Fixes: 6286bbb4 ("cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states")
Signed-off-by: default avatarHenry Martin <bsdhenrymartin@gmail.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 92d55d70
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment