From: Jim Houston Date: Sat, 28 Oct 2006 17:38:56 +0000 (-0700) Subject: [PATCH] time_adjust cleared before use X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=bb1d860551c4307b1a7ee9a21b120319075e987e;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.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; } } }