-mm swsusp: make sure we do not return to userspace where image is on disk

From: Pavel Machek
Date: Wed Jul 28 2004 - 17:32:41 EST


Hi!

When image is already on the disk, returning back to user is
dangerous. Please apply,
Pavel

--- clean-mm/kernel/power/disk.c 2004-07-28 23:39:49.000000000 +0200
+++ linux-mm/kernel/power/disk.c 2004-07-28 23:33:46.000000000 +0200
@@ -63,8 +63,10 @@
break;
}
machine_halt();
- device_power_up();
- local_irq_restore(flags);
+ /* Valid image is on the disk, if we continue we risk serious data corruption
+ after resume. */
+ printk("Please power me down manually\n");
+ while(1);
return 0;
}


--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/