diff options
author | Jim Houston <jim.houston@comcast.net> | 2006-10-28 13:38:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-28 14:30:55 -0400 |
commit | bb1d860551c4307b1a7ee9a21b120319075e987e (patch) | |
tree | b1a7ba710c54f76684a85f241802980b3bcbb92c /kernel | |
parent | eba6cd671427df295c10b54ee69cd5de419d38fe (diff) |
[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 <zippel@linux-m68k.org>
Signed-off-by: Jim Houston <jim.houston@ccur.com>
Cc: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/ntp.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
161 | time_adjust += MAX_TICKADJ; | 161 | time_adjust += MAX_TICKADJ; |
162 | tick_length -= MAX_TICKADJ_SCALED; | 162 | tick_length -= MAX_TICKADJ_SCALED; |
163 | } else { | 163 | } else { |
164 | time_adjust = 0; | ||
165 | tick_length += (s64)(time_adjust * NSEC_PER_USEC / | 164 | tick_length += (s64)(time_adjust * NSEC_PER_USEC / |
166 | HZ) << TICK_LENGTH_SHIFT; | 165 | HZ) << TICK_LENGTH_SHIFT; |
166 | time_adjust = 0; | ||
167 | } | 167 | } |
168 | } | 168 | } |
169 | } | 169 | } |