PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 10 May 2011 19:10:13 +0000 (21:10 +0200)
committerSteve Conklin <sconklin@canonical.com>
Thu, 2 Jun 2011 19:23:23 +0000 (14:23 -0500)
commitffea945dac7e9bc12264370d169eee02f4949078
tree2bdca9fd9a1bc409ced979b8a759e0469a1b55cc
parent2ee904fe109d164553d171199c7e5a4ad46a5473
PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM

BugLink: http://bugs.launchpad.net/bugs/788691

commit 36cb7035ea0c11ef2c7fa2bbe0cd181b23569b29 upstream.

The SNAPSHOT_S2RAM ioctl used for implementing the feature allowing
one to suspend to RAM after creating a hibernation image is currently
broken, because it doesn't clear the "ready" flag in the struct
snapshot_data object handled by it.  As a result, the
SNAPSHOT_UNFREEZE doesn't work correctly after SNAPSHOT_S2RAM has
returned and the user space hibernate task cannot thaw the other
processes as appropriate.  Make SNAPSHOT_S2RAM clear data->ready
to fix this problem.

Tested-by: Alexandre Felipe Muller de Souza <alexandrefm@mandriva.com.br>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Steve Conklin <sconklin@canonical.com>
kernel/power/user.c