[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250410043743.rxwixe7slr342d56@vireshk-i7>
Date: Thu, 10 Apr 2025 10:07:43 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Henry Martin <bsdhenrymartin@...il.com>
Cc: sven@...npeter.dev, j@...nau.net, alyssa@...enzweig.io, neal@...pa.dev,
rafael@...nel.org, asahi@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] cpufreq: apple-soc: Fix null-ptr-deref in
apple_soc_cpufreq_get_rate()
On 09-04-25, 20:48, Henry Martin wrote:
> 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: 6286bbb40576 ("cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states")
> Signed-off-by: Henry Martin <bsdhenrymartin@...il.com>
> ---
> V1 -> V2: Use `if (unlikely(!policy))` instead of `if (!policy)`
>
> drivers/cpufreq/apple-soc-cpufreq.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
Applied. Thanks.
--
viresh
Powered by blists - more mailing lists