Skip to content
Commit 2933954b authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PM: sleep: Fix possible overflow in pm_system_cancel_wakeup()



It is not actually guaranteed that pm_abort_suspend will be
nonzero when pm_system_cancel_wakeup() is called which may lead to
subtle issues, so make it use atomic_dec_if_positive() instead of
atomic_dec() for the safety sake.

Fixes: 33e4f80e ("ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle")
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 9089f16e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment