mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
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>
This commit is contained in:
parent
9045a05044
commit
51d6ff7acd
2 changed files with 6 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue