Patch "PM / Runtime: Fix error path in pm_runtime_force_resume()" has been added to the 4.5-stable tree
Subsystems (5)
This is a note to let you know that I've just added the patch titled
PM / Runtime: Fix error path in pm_runtime_force_resume()
to the 4.5-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-runtime-fix-error-path-in-pm_runtime_force_resume.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
0ae3aeefabbeef26294e7a349b51f1c761d46c9fMon Sep 17 00:00:00 2001
From: Ulf Hansson <[email protected]>
Date: Fri, 8 Apr 2016 13:10:23 +0200
Subject: PM / Runtime: Fix error path in pm_runtime_force_resume()
From: Ulf Hansson <[email protected]>
commit 0ae3aeefabbeef26294e7a349b51f1c761d46c9f upstream.
As pm_runtime_set_active() may fail because the device's parent isn't active, we can end up executing the ->runtime_resume() callback for the device when it isn't allowed.
Fix this by invoking pm_runtime_set_active() before running the callback and let's also deal with the error code.
--- drivers/base/power/runtime.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/base/power/runtime.c +7 -2
@@ -1506,11 +1506,16 @@ int pm_runtime_force_resume(struct devic goto out; } - ret =callback (dev); + ret =pm_runtime_set_active (dev);if (ret) goto out; -pm_runtime_set_active (dev); + ret =callback (dev); +if (ret) { +pm_runtime_set_suspended (dev); + goto out; + } +pm_runtime_mark_last_busy (dev); out:pm_runtime_enable (dev);
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/pm-runtime-fix-error-path-in-pm_runtime_force_resume.patch