aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2012-02-17 17:39:51 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2012-03-04 17:08:37 -0500
commit05b4877f6a4f1ba4952d1222213d262bf8c132b7 (patch)
tree7205a80a5919c1f389873c78740d504800fb60e5 /kernel/power
parent4782e1654bdbd30cf307da090b3c4f70157477cb (diff)
PM / Hibernate: Enable usermodehelpers in hibernate() error path
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> Cc: stable@vger.kernel.org Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/hibernate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 72baaf011fb7..0a186cfde788 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -618,7 +618,7 @@ int hibernate(void)
618 /* Allocate memory management structures */ 618 /* Allocate memory management structures */
619 error = create_basic_memory_bitmaps(); 619 error = create_basic_memory_bitmaps();
620 if (error) 620 if (error)
621 goto Exit; 621 goto Enable_umh;
622 622
623 printk(KERN_INFO "PM: Syncing filesystems ... "); 623 printk(KERN_INFO "PM: Syncing filesystems ... ");
624 sys_sync(); 624 sys_sync();
@@ -626,7 +626,7 @@ int hibernate(void)
626 626
627 error = freeze_processes(); 627 error = freeze_processes();
628 if (error) 628 if (error)
629 goto Finish; 629 goto Free_bitmaps;
630 630
631 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); 631 error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
632 if (error || freezer_test_done) 632 if (error || freezer_test_done)
@@ -659,8 +659,9 @@ int hibernate(void)
659 /* Don't bother checking whether freezer_test_done is true */ 659 /* Don't bother checking whether freezer_test_done is true */
660 freezer_test_done = false; 660 freezer_test_done = false;
661 661
662 Finish: 662 Free_bitmaps:
663 free_basic_memory_bitmaps(); 663 free_basic_memory_bitmaps();
664 Enable_umh:
664 usermodehelper_enable(); 665 usermodehelper_enable();
665 Exit: 666 Exit:
666 pm_notifier_call_chain(PM_POST_HIBERNATION); 667 pm_notifier_call_chain(PM_POST_HIBERNATION);