PM / Hibernate: Enable usermodehelpers in hibernate() error path
commit 05b4877f6a upstream.
If create_basic_memory_bitmaps() fails, usermodehelpers are not re-enabled
before returning. Fix this. And while at it, reword the goto labels so that
they look more meaningful.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5f8d170995
commit
65554407a7
1 changed files with 4 additions and 3 deletions
|
|
@ -623,7 +623,7 @@ int hibernate(void)
|
|||
/* Allocate memory management structures */
|
||||
error = create_basic_memory_bitmaps();
|
||||
if (error)
|
||||
goto Exit;
|
||||
goto Enable_umh;
|
||||
|
||||
printk(KERN_INFO "PM: Syncing filesystems ... ");
|
||||
sys_sync();
|
||||
|
|
@ -631,7 +631,7 @@ int hibernate(void)
|
|||
|
||||
error = prepare_processes();
|
||||
if (error)
|
||||
goto Finish;
|
||||
goto Free_bitmaps;
|
||||
|
||||
if (hibernation_test(TEST_FREEZER))
|
||||
goto Thaw;
|
||||
|
|
@ -663,8 +663,9 @@ int hibernate(void)
|
|||
|
||||
Thaw:
|
||||
thaw_processes();
|
||||
Finish:
|
||||
Free_bitmaps:
|
||||
free_basic_memory_bitmaps();
|
||||
Enable_umh:
|
||||
usermodehelper_enable();
|
||||
Exit:
|
||||
pm_notifier_call_chain(PM_POST_HIBERNATION);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue