Messages in this thread | | | Subject | Re: [PATCH v4 3/5] kernel/cpu_pm: Fix uninitted local in cpu_pm | From | Stephen Boyd <> | Date | Thu, 23 Apr 2020 19:43:50 -0700 |
| |
Quoting Douglas Anderson (2020-04-22 14:55:01) > 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") > Signed-off-by: Douglas Anderson <dianders@chromium.org> > ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
| |