Index: linux-2.6.21/kernel/timer.c =================================================================== --- linux-2.6.21.orig/kernel/timer.c 2007-02-16 16:45:44.000000000 -0800 +++ linux-2.6.21/kernel/timer.c 2007-03-01 11:56:23.000000000 -0800 @@ -841,14 +841,14 @@ EXPORT_SYMBOL(do_gettimeofday); */ int do_settimeofday(struct timespec *tv) { - unsigned long flags; time_t wtm_sec, sec = tv->tv_sec; long wtm_nsec, nsec = tv->tv_nsec; if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) return -EINVAL; - write_seqlock_irqsave(&xtime_lock, flags); + BUG_ON(irqs_disabled()); + write_seqlock_irq(&xtime_lock); nsec -= __get_nsec_offset(); @@ -861,7 +861,7 @@ int do_settimeofday(struct timespec *tv) clock->error = 0; ntp_clear(); - write_sequnlock_irqrestore(&xtime_lock, flags); + write_sequnlock_irq(&xtime_lock); /* signal hrtimers about time change */ clock_was_set(); @@ -981,6 +981,7 @@ static int timekeeping_resume(struct sys unsigned long flags; unsigned long now = read_persistent_clock(); + WARN_ON_ONCE(irqs_disabled()); write_seqlock_irqsave(&xtime_lock, flags); if (now && (now > timekeeping_suspend_time)) {