]> git.baikalelectronics.ru Git - kernel.git/commit
PM / reboot: Eliminate race between reboot and suspend
authorPingfan Liu <kernelfans@gmail.com>
Tue, 31 Jul 2018 08:51:32 +0000 (16:51 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 6 Aug 2018 10:35:20 +0000 (12:35 +0200)
commit8e87d8634e1c5ee9cbfa9a3ae09917a56b3561b5
treec89f476f4866d1e3ee11aa8b8601c68a23e3b025
parentffadee7dd28a6789f7f54e0e1e202d71c84e5ab6
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>
Documentation/power/freezing-of-tasks.txt
Documentation/power/suspend-and-cpuhotplug.txt
include/linux/suspend.h
kernel/freezer.c
kernel/power/hibernate.c
kernel/power/main.c
kernel/power/suspend.c
kernel/power/user.c
kernel/reboot.c
mm/page_alloc.c