This is a note to let you know that I've just added the patch titled

    PM / Hibernate: Thaw kernel threads in SNAPSHOT_CREATE_IMAGE ioctl path

to the 3.2-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pm-hibernate-thaw-kernel-threads-in-snapshot_create_image-ioctl-path.patch
and it can be found in the queue-3.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From fe9161db2e6053da21e4649d77bbefaf3030b11d Mon Sep 17 00:00:00 2001
From: "Srivatsa S. Bhat" <[email protected]>
Date: Wed, 1 Feb 2012 22:16:36 +0100
Subject: PM / Hibernate: Thaw kernel threads in SNAPSHOT_CREATE_IMAGE ioctl path

From: "Srivatsa S. Bhat" <[email protected]>

commit fe9161db2e6053da21e4649d77bbefaf3030b11d upstream.

In the SNAPSHOT_CREATE_IMAGE ioctl, if the call to hibernation_snapshot()
fails, the frozen tasks are not thawed.

And in the case of success, if we happen to exit due to a successful freezer
test, all tasks (including those of userspace) are thawed, whereas actually
we should have thawed only the kernel threads at that point. Fix both these
issues.

Signed-off-by: Srivatsa S. Bhat <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 kernel/power/user.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -283,13 +283,15 @@ static long snapshot_ioctl(struct file *
                }
                pm_restore_gfp_mask();
                error = hibernation_snapshot(data->platform_support);
-               if (!error) {
+               if (error) {
+                       thaw_kernel_threads();
+               } else {
                        error = put_user(in_suspend, (int __user *)arg);
                        if (!error && !freezer_test_done)
                                data->ready = 1;
                        if (freezer_test_done) {
                                freezer_test_done = false;
-                               thaw_processes();
+                               thaw_kernel_threads();
                        }
                }
                break;


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.2/pm-hibernate-fix-s2disk-regression-related-to-freezing-workqueues.patch
queue-3.2/pm-hibernate-thaw-kernel-threads-in-snapshot_create_image-ioctl-path.patch
queue-3.2/pm-hibernate-thaw-processes-in-snapshot_create_image-ioctl-test-path.patch
--
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

Reply via email to