summaryrefslogtreecommitdiffstats
path: root/kernel/power/hibernate.c
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2012-02-04 22:26:38 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2012-02-09 23:55:54 +0100
commit51d6ff7acd920379f54d0be4dbe844a46178a65f (patch)
treeb016233eaf9dd4f1698ca6e8e649d1df905a48ec /kernel/power/hibernate.c
parent9045a05044268b075c13bb0284601b24959dc3c6 (diff)
downloadop-kernel-dev-51d6ff7acd920379f54d0be4dbe844a46178a65f.zip
op-kernel-dev-51d6ff7acd920379f54d0be4dbe844a46178a65f.tar.gz
PM / Hibernate: Thaw kernel threads in hibernation_snapshot() in error/test path
In the hibernation call path, the kernel threads are frozen inside hibernation_snapshot(). If we happen to encounter an error further down the road or if we are exiting early due to a successful freezer test, then thaw kernel threads before returning to the caller. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power/hibernate.c')
-rw-r--r--kernel/power/hibernate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index a5d4cf0..c6dee73 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -343,13 +343,13 @@ int hibernation_snapshot(int platform_mode)
* successful freezer test.
*/
freezer_test_done = true;
- goto Cleanup;
+ goto Thaw;
}
error = dpm_prepare(PMSG_FREEZE);
if (error) {
dpm_complete(PMSG_RECOVER);
- goto Cleanup;
+ goto Thaw;
}
suspend_console();
@@ -385,6 +385,8 @@ int hibernation_snapshot(int platform_mode)
platform_end(platform_mode);
return error;
+ Thaw:
+ thaw_kernel_threads();
Cleanup:
swsusp_free();
goto Close;
OpenPOWER on IntegriCloud