From: Jim Houston Date: Sat, 28 Oct 2006 17:38:56 +0000 (-0700) Subject: [PATCH] time_adjust cleared before use X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bb1d860551c4307b1a7ee9a21b120319075e987e;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [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 47195fa0ec4f..3afeaa3a73f9 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; } } }