Commit 4b952bf6 authored by Srivatsa S. Bhat's avatar Srivatsa S. Bhat Committed by Greg Kroah-Hartman

PM / Hibernate: Enable usermodehelpers in hibernate() error path

commit 05b4877f 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: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 49341010
......@@ -648,7 +648,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();
......@@ -656,7 +656,7 @@ int hibernate(void)
error = prepare_processes();
if (error)
goto Finish;
goto Free_bitmaps;
error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
if (error)
......@@ -689,8 +689,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment