PM / Hibernate: Thaw kernel threads in SNAPSHOT_CREATE_IMAGE ioctl path
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Wed, 1 Feb 2012 21:16:36 +0000 (22:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Feb 2012 19:16:56 +0000 (11:16 -0800)
commit695cb013a3332b6c773c8a75be97aa6f91bc227f
tree1240b7657c32848728377c5151c2ebc697ee6211
parent26b67a54a31d8e18f66f52d6bae4907963648d3c
PM / Hibernate: Thaw kernel threads in SNAPSHOT_CREATE_IMAGE ioctl path

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 <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/user.c