History

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.

Rafael J. Wysocki committed 15 years ago

Commit 36cb7031 parent 97449971 file · +1 −0Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/power/user.c+1−0
@@ -381,6 +381,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, · 380 unmodified lines
381 * PM_HIBERNATION_PREPARE381 * PM_HIBERNATION_PREPARE
382 */382 */
383 error = suspend_devices_and_enter(PM_SUSPEND_MEM);383 error = suspend_devices_and_enter(PM_SUSPEND_MEM);
384 data->ready = 0;
384 break;385 break;
385 386
386 case SNAPSHOT_PLATFORM_SUPPORT:387 case SNAPSHOT_PLATFORM_SUPPORT: