Files
twx-linux/kernel
Douglas Anderson 262c6e883e kernel/cpu_pm: Fix uninitted local in cpu_pm
commit b5945214b7 upstream.

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: ab10023e00 ("cpu_pm: Add cpu power management notifiers")
Cc: stable@vger.kernel.org
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200504104917.v6.3.I2d44fc0053d019f239527a4e5829416714b7e299@changeid
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-22 09:05:28 +02:00
..
…
2019-12-13 08:51:11 +01:00
2019-12-01 09:17:17 +01:00
…
…
…
…
2020-03-25 08:06:14 +01:00
…
…
…
…
…
…
2020-03-25 08:06:13 +01:00
…
…
2019-01-13 09:51:06 +01:00
…
…
…
…
2020-04-17 10:48:47 +02:00
…
…
…
…
2020-01-09 10:18:59 +01:00
…
…
…
…
…
2020-05-14 07:57:21 +02:00
…
…