]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Mar 2012 15:40:12 +0000 (08:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Mar 2012 15:40:12 +0000 (08:40 -0700)
added patches:
pm-hibernate-enable-usermodehelpers-in-hibernate-error-path.patch

queue-3.3/pm-hibernate-enable-usermodehelpers-in-hibernate-error-path.patch [new file with mode: 0644]
queue-3.3/series

diff --git a/queue-3.3/pm-hibernate-enable-usermodehelpers-in-hibernate-error-path.patch b/queue-3.3/pm-hibernate-enable-usermodehelpers-in-hibernate-error-path.patch
new file mode 100644 (file)
index 0000000..0f5b182
--- /dev/null
@@ -0,0 +1,52 @@
+From 05b4877f6a4f1ba4952d1222213d262bf8c132b7 Mon Sep 17 00:00:00 2001
+From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
+Date: Fri, 17 Feb 2012 23:39:51 +0100
+Subject: PM / Hibernate: Enable usermodehelpers in hibernate() error path
+
+From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
+
+commit 05b4877f6a4f1ba4952d1222213d262bf8c132b7 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>
+
+---
+ kernel/power/hibernate.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/kernel/power/hibernate.c
++++ b/kernel/power/hibernate.c
+@@ -616,7 +616,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();
+@@ -624,7 +624,7 @@ int hibernate(void)
+       error = freeze_processes();
+       if (error)
+-              goto Finish;
++              goto Free_bitmaps;
+       error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
+       if (error)
+@@ -657,8 +657,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);
index 76198f2c1ad08767b1e446641f8ea9437ace9b53..aad6f5019f40b38c1281cdf09d103232a62cc29f 100644 (file)
@@ -132,3 +132,4 @@ pm-shmobile-make-mtu2-driver-use-pm_genpd_dev_always_on.patch
 rtlwifi-convert-to-asynchronous-firmware-load.patch
 staging-r8712u-add-missing-initialization-and-remove-configuration-parameter-config_r8712_ap.patch
 nfsv4-rate-limit-the-state-manager-warning-messages.patch
+pm-hibernate-enable-usermodehelpers-in-hibernate-error-path.patch