[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gF9XRNnn+O+kCRFtas9sgrQgk8piF1OoHqmGhi66qZwg@mail.gmail.com>
Date: Thu, 7 Jan 2021 17:39:24 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Viresh Kumar <viresh.kumar@...aro.org>,
Colin King <colin.king@...onical.com>
Cc: "Rafael J . Wysocki" <rjw@...ysocki.net>,
Stephen Warren <swarren@...dia.com>,
Linux PM <linux-pm@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][V3] cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get
On Tue, Jan 5, 2021 at 11:22 AM Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> On 05-01-21, 10:19, Colin King wrote:
> > From: Colin Ian King <colin.king@...onical.com>
> >
> > Currently there is an unlikely case where cpufreq_cpu_get returns a
> > null policy and this will cause a null pointer dereference later on.
> > Fix this by passing the policy to transition_frequency_fidvid from the
> > caller and hence eliminating the need for the cpufreq_cpu_get and
> > cpufreq_cpu_put. Thanks to Viresh Kumar for suggesting the fix.
> >
> > Addresses-Coverity: ("Dereference null return")
> > Fixes: b43a7ffbf33b ("cpufreq: Notify all policy->cpus in cpufreq_notify_transition()")
> > Signed-off-by: Colin Ian King <colin.king@...onical.com>
> > ---
> >
> > V2: pass the policy to transition_frequency_fidvid rather than add
> > a null pointer check on the return from a cpufreq_cpu_get call.
> > V3: update subject line to match the fix
> >
> > ---
> > drivers/cpufreq/powernow-k8.c | 9 +++------
> > 1 file changed, 3 insertions(+), 6 deletions(-)
>
> Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
Applied as 5.11-rc material, thanks!
Powered by blists - more mailing lists