[PATCH] ntp: avoid time_offset overflows
authorjohn stultz <johnstul@us.ibm.com>
Tue, 27 Mar 2007 05:32:26 +0000 (21:32 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 27 Mar 2007 16:05:15 +0000 (09:05 -0700)
commitd62ac21aa075c8ddf3d02a98d28afce635e77e8e
treed315a4aaa57b219c151a5e2d9ae0e557517a0bd2
parentb92c4f922b2e8c70f8790d42e45bb9401c57be63
[PATCH] ntp: avoid time_offset overflows

I've been seeing some odd NTP behavior recently on a few boxes and
finally narrowed it down to time_offset overflowing when converted to
SHIFT_UPDATE units (which was a side effect from my HZfreeNTP patch).

This patch converts time_offset from a long to a s64 which resolves the
issue.

[tglx@linutronix.de: signedness fixes]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/time/ntp.c