mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
[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>
This commit is contained in:
parent
eba6cd6714
commit
bb1d860551
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user