diff options
author | Henry Martin <bsdhenrymartin@gmail.com> | 2025-04-08 23:03:53 +0800 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2025-04-10 10:08:47 +0530 |
commit | 484d3f15cc6cbaa52541d6259778e715b2c83c54 (patch) | |
tree | 5c2a3dea8567b60e0e5f497e2cbaea8738a9f2d0 /rust/helpers/helpers.c | |
parent | 9992649f6786921873a9b89dafa5e04d8c5fef2b (diff) | |
download | linux-484d3f15cc6cbaa52541d6259778e715b2c83c54.tar.gz linux-484d3f15cc6cbaa52541d6259778e715b2c83c54.tar.bz2 linux-484d3f15cc6cbaa52541d6259778e715b2c83c54.zip |
cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
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>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions