diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-05-10 21:10:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-21 15:13:13 -0700 |
commit | 782cfad3ae0722283b31c747a7f02b974e273f06 (patch) | |
tree | 2884db4b7e4db6df1ef898c05d04653aa87ee3e1 /kernel | |
parent | 29639f09f1f93fec0b6a53aff7cf8927bbd3b783 (diff) | |
download | lwn-782cfad3ae0722283b31c747a7f02b974e273f06.tar.gz lwn-782cfad3ae0722283b31c747a7f02b974e273f06.zip |
PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/user.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c index 6522be913ac1..7d02d33be699 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -381,6 +381,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, * PM_HIBERNATION_PREPARE */ error = suspend_devices_and_enter(PM_SUSPEND_MEM); + data->ready = 0; break; case SNAPSHOT_PLATFORM_SUPPORT: |