summaryrefslogtreecommitdiff
path: root/Documentation/power/suspend-and-cpuhotplug.txt
diff options
context:
space:
mode:
authorPingfan Liu <kernelfans@gmail.com>2018-07-31 11:51:32 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-08-06 13:35:20 +0300
commit55f2503c3b69328735e88031ff8d6ba291bd952b (patch)
treec89f476f4866d1e3ee11aa8b8601c68a23e3b025 /Documentation/power/suspend-and-cpuhotplug.txt
parent82837ad5bda79cd13d64b9abad92e7872a06bc65 (diff)
downloadlinux-55f2503c3b69328735e88031ff8d6ba291bd952b.tar.xz
PM / reboot: Eliminate race between reboot and suspend
At present, "systemctl suspend" and "shutdown" can run in parrallel. A system can suspend after devices_shutdown(), and resume. Then the shutdown task goes on to power off. This causes many devices are not really shut off. Hence replacing reboot_mutex with system_transition_mutex (renamed from pm_mutex) to achieve the exclusion. The renaming of pm_mutex as system_transition_mutex can be better to reflect the purpose of the mutex. Signed-off-by: Pingfan Liu <kernelfans@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/power/suspend-and-cpuhotplug.txt')
-rw-r--r--Documentation/power/suspend-and-cpuhotplug.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/power/suspend-and-cpuhotplug.txt b/Documentation/power/suspend-and-cpuhotplug.txt
index 6f55eb960a6d..a8751b8df10e 100644
--- a/Documentation/power/suspend-and-cpuhotplug.txt
+++ b/Documentation/power/suspend-and-cpuhotplug.txt
@@ -32,7 +32,7 @@ More details follow:
sysfs file
|
v
- Acquire pm_mutex lock
+ Acquire system_transition_mutex lock
|
v
Send PM_SUSPEND_PREPARE
@@ -96,10 +96,10 @@ execution during resume):
* thaw tasks
* send PM_POST_SUSPEND notifications
-* Release pm_mutex lock.
+* Release system_transition_mutex lock.
-It is to be noted here that the pm_mutex lock is acquired at the very
+It is to be noted here that the system_transition_mutex lock is acquired at the very
beginning, when we are just starting out to suspend, and then released only
after the entire cycle is complete (i.e., suspend + resume).