Skip to content

Commit 36cb703

Browse files
committed
PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM
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> Cc: stable@kernel.org
1 parent 9744997 commit 36cb703

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎kernel/power/user.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
381381
* PM_HIBERNATION_PREPARE
382382
*/
383383
error = suspend_devices_and_enter(PM_SUSPEND_MEM);
384+
data->ready = 0;
384385
break;
385386

386387
case SNAPSHOT_PLATFORM_SUPPORT:

0 commit comments

Comments
 (0)