WSL2-Linux-Kernel/kernel/power
Liu ShuoX e5248a111b PM / Sleep: avoid 'autosleep' in shutdown progress
Prevent automatic system suspend from happening during system
shutdown by making try_to_suspend() check system_state and return
immediately if it is not SYSTEM_RUNNING.

This prevents the following breakage from happening (scenario from
Zhang Yanmin):

 Kernel starts shutdown and calls all device driver's shutdown
 callback.  When a driver's shutdown is called, the last wakelock is
 released and suspend-to-ram starts.  However, as some driver's shut
 down callbacks already shut down devices and disabled runtime pm,
 the suspend-to-ram calls driver's suspend callback without noticing
 that device is already off and causes crash.

[rjw: Changelog]
Signed-off-by: Liu ShuoX <shuox.liu@intel.com>
Cc: 3.5+ <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-15 01:31:37 +02:00
..
Kconfig Merge branch 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2013-07-02 19:53:30 -07:00
Makefile
autosleep.c PM / Sleep: avoid 'autosleep' in shutdown progress 2013-07-15 01:31:37 +02:00
block_io.c
console.c PM: make VT switching to the suspend console optional v3 2013-02-20 01:33:41 +01:00
hibernate.c
main.c PM / Sleep: Warn about system time after resume with pm_trace 2013-06-27 22:14:46 +02:00
power.h
poweroff.c power/sysrq: fix inconstistent help message of sysrq key 2013-04-30 17:04:10 -07:00
process.c freezer: shorten freezer sleep time using exponential backoff 2013-05-12 14:16:22 +02:00
qos.c PM / QoS: Add pm_qos_request tracepoints 2013-06-24 13:09:03 +02:00
snapshot.c Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
suspend.c PM / wakeup: Adjust messaging for wake events during suspend 2013-06-11 23:53:37 +02:00
suspend_test.c driver-core: constify data for class_find_device() 2013-02-06 12:18:56 -08:00
swap.c PM / Hibernate: use rb_entry 2012-11-15 00:37:08 +01:00
user.c
wakelock.c