Skip to content

Commit 93c9a7f

Browse files
rjwysockiLinus Torvalds
authored andcommitted
[PATCH] swsusp: Fix SNAPSHOT_S2RAM ioctl
The SNAPSHOT_S2RAM ioctl does not disable the nonboot CPUs before entering the suspend, although it should do this. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent acf11fa commit 93c9a7f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎kernel/power/user.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,12 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
368368
if (error) {
369369
printk(KERN_ERR "Failed to suspend some devices.\n");
370370
} else {
371-
/* Enter S3, system is already frozen */
372-
suspend_enter(PM_SUSPEND_MEM);
373-
371+
error = disable_nonboot_cpus();
372+
if (!error) {
373+
/* Enter S3, system is already frozen */
374+
suspend_enter(PM_SUSPEND_MEM);
375+
enable_nonboot_cpus();
376+
}
374377
/* Wake up devices */
375378
device_resume();
376379
}

0 commit comments

Comments
 (0)