On Sun, 2006-08-13 at 23:06 +0200, Rafael J. Wysocki wrote:
> Detect the situations in which the time after a resume from disk would
> be earlier than the time before the suspend and prevent them from
> happening on i386.
>
> Signed-off-by: Rafael J. Wysocki <[email protected]>
One minor comment, but otherwise looks good.
> @@ -302,16 +305,25 @@ static int timer_resume(struct sys_devic
> {
> unsigned long flags;
> unsigned long sec;
> - unsigned long sleep_length;
> + unsigned long ctime = get_cmos_time();
> + long sleep_length = (ctime - sleep_start) * HZ;
> struct timespec ts;
> +
> + if (sleep_length < 0) {
> + printk(KERN_WARNING "Time skew detected in timer resume!\n");
Please make sure the warning describes the CMOS clock going backwards,
rather then just the vague "time skew detected" comment.
> + /* The time after the resume must not be earlier than the time
s/time/CMOS clock/
Acked-by: John Stultz <[email protected]>
thanks
-john
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]