[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200515072539.GA1334029@kroah.com>
Date: Fri, 15 May 2020 09:25:39 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Douglas Anderson <dianders@...omium.org>
Cc: rafael.j.wysocki@...el.com, Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
evgreen@...omium.org, swboyd@...omium.org, mka@...omium.org,
mkshah@...eaurora.org, Alexios Zavras <alexios.zavras@...el.com>,
Colin Cross <ccross@...roid.com>,
Kevin Hilman <khilman@...com>,
Santosh Shilimkar <santosh.shilimkar@...com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 3/5] kernel/cpu_pm: Fix uninitted local in cpu_pm
On Mon, May 04, 2020 at 10:50:17AM -0700, Douglas Anderson wrote:
> cpu_pm_notify() is basically a wrapper of notifier_call_chain().
> notifier_call_chain() doesn't initialize *nr_calls to 0 before it
> starts incrementing it--presumably it's up to the callers to do this.
>
> Unfortunately the callers of cpu_pm_notify() don't init *nr_calls.
> This potentially means you could get too many or two few calls to
> CPU_PM_ENTER_FAILED or CPU_CLUSTER_PM_ENTER_FAILED depending on the
> luck of the stack.
>
> Let's fix this.
>
> Fixes: ab10023e0088 ("cpu_pm: Add cpu power management notifiers")
> Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Reviewed-by: Stephen Boyd <swboyd@...omium.org>
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> ---
Should also have a cc: stable@...r.kernel.org tag on it.
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists