From: Jim Houston Date: Sat, 28 Oct 2006 17:38:56 +0000 (-0700) Subject: [PATCH] time_adjust cleared before use X-Git-Tag: v2.6.19-rc4~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb1d860551c4307b1a7ee9a21b120319075e987e;p=linux-2.6 [PATCH] time_adjust cleared before use I notice that the code which implements adjtime clears the time_adjust value before using it. The attached patch makes the obvious fix. Acked-by: Roman Zippel Signed-off-by: Jim Houston Cc: John Stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 47195fa0ec..3afeaa3a73 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -161,9 +161,9 @@ void second_overflow(void) time_adjust += MAX_TICKADJ; tick_length -= MAX_TICKADJ_SCALED; } else { - time_adjust = 0; tick_length += (s64)(time_adjust * NSEC_PER_USEC / HZ) << TICK_LENGTH_SHIFT; + time_adjust = 0; } } }