This is a note to let you know that I've just added the patch titled PM: sleep: Do not let "syscore" devices runtime-suspend during system transitions to the 5.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pm-sleep-do-not-let-syscore-devices-runtime-suspend-during-system-transitions.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 928265e3601cde78c7e0a3e518a93b27defed3b1 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx> Date: Fri, 22 Oct 2021 14:58:23 +0200 Subject: PM: sleep: Do not let "syscore" devices runtime-suspend during system transitions From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> commit 928265e3601cde78c7e0a3e518a93b27defed3b1 upstream. There is no reason to allow "syscore" devices to runtime-suspend during system-wide PM transitions, because they are subject to the same possible failure modes as any other devices in that respect. Accordingly, change device_prepare() and device_complete() to call pm_runtime_get_noresume() and pm_runtime_put(), respectively, for "syscore" devices too. Fixes: 057d51a1268f ("Merge branch 'pm-sleep'") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Cc: 3.10+ <stable@xxxxxxxxxxxxxxx> # 3.10+ Reviewed-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/base/power/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -1051,7 +1051,7 @@ static void device_complete(struct devic const char *info = NULL; if (dev->power.syscore) - return; + goto out; device_lock(dev); @@ -1081,6 +1081,7 @@ static void device_complete(struct devic device_unlock(dev); +out: pm_runtime_put(dev); } @@ -1794,9 +1795,6 @@ static int device_prepare(struct device int (*callback)(struct device *) = NULL; int ret = 0; - if (dev->power.syscore) - return 0; - /* * If a device's parent goes into runtime suspend at the wrong time, * it won't be possible to resume the device. To prevent this we @@ -1805,6 +1803,9 @@ static int device_prepare(struct device */ pm_runtime_get_noresume(dev); + if (dev->power.syscore) + return 0; + device_lock(dev); dev->power.wakeup_path = false; Patches currently in stable-queue which might be from rafael.j.wysocki@xxxxxxxxx are queue-5.14/pm-sleep-do-not-let-syscore-devices-runtime-suspend-during-system-transitions.patch