mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Although try_to_freeze_tasks() stops when there's a wakeup, it doesn't return an error when it successfully freezes everything it wants to freeze. As a result, the suspend attempt can continue even after a wakeup is issued. Although the wakeup will be eventually caught later in the suspend process, kicking the can down the road is suboptimal; when there's a wakeup detected, suspend should be immediately aborted by returning an error instead. Make try_to_freeze_tasks() do just that, and also move the wakeup check above the `todo` check so that we don't miss a wakeup from a process that successfully froze. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: azrim <mirzaspc@gmail.com>