On 03/23/2012 03:28 AM, [email protected] wrote: > > The patch below does not apply to the 3.0-stable tree. > If someone wants it applied there, or to any other stable or longterm > tree, then please email the backport, including the original git commit > id to <[email protected]>. > > thanks, > > greg k-h > > ------------------ original commit in Linus's tree ------------------ > > From 05b4877f6a4f1ba4952d1222213d262bf8c132b7 Mon Sep 17 00:00:00 2001 > From: "Srivatsa S. Bhat" <[email protected]> > Date: Fri, 17 Feb 2012 23:39:51 +0100 > Subject: [PATCH] PM / Hibernate: Enable usermodehelpers in hibernate() error > path >
Here is the backported version for 3.0.y: --- From: Srivatsa S. Bhat <[email protected]> Subject: PM / Hibernate: Enable usermodehelpers in hibernate() error path [ Upstream commit 05b4877f6a4f1ba4952d1222213d262bf8c132b7 ] 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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> --- kernel/power/hibernate.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 8f7b1db..8884c27 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -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); -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
