mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
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>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
82837ad5bd
commit
55f2503c3b
@@ -414,7 +414,7 @@ static inline bool hibernation_available(void) { return false; }
|
||||
#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */
|
||||
#define PM_POST_RESTORE 0x0006 /* Restore failed */
|
||||
|
||||
extern struct mutex pm_mutex;
|
||||
extern struct mutex system_transition_mutex;
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
void save_processor_state(void);
|
||||
|
Reference in New Issue
Block a user