Skip to content

Commit

Permalink
[PATCH] time_adjust cleared before use
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jim Houston authored and Linus Torvalds committed Oct 28, 2006
1 parent eba6cd6 commit bb1d860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit bb1d860

Please sign in to comment.