summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds2012-07-18 19:36:02 +0200
committerLinus Torvalds2012-07-18 19:36:02 +0200
commit6f7024285864290259d6b4c36f9e84a4b89ec3c4 (patch)
tree6d6c429ae933289a993030609e2c2bb3627fda4f /kernel
parentv4l2-dev: forgot to add VIDIOC_DV_TIMINGS_CAP. (diff)
parentntp: Fix STA_INS/DEL clearing bug (diff)
downloadkernel-qcow2-linux-6f7024285864290259d6b4c36f9e84a4b89ec3c4.tar.gz
kernel-qcow2-linux-6f7024285864290259d6b4c36f9e84a4b89ec3c4.tar.xz
kernel-qcow2-linux-6f7024285864290259d6b4c36f9e84a4b89ec3c4.zip
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
One more time/ntp fix pulled from Ingo Molnar. * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: ntp: Fix STA_INS/DEL clearing bug
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/ntp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 70b33abcc7bb..b7fbadc5c973 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -409,7 +409,9 @@ int second_overflow(unsigned long secs)
time_state = TIME_DEL;
break;
case TIME_INS:
- if (secs % 86400 == 0) {
+ if (!(time_status & STA_INS))
+ time_state = TIME_OK;
+ else if (secs % 86400 == 0) {
leap = -1;
time_state = TIME_OOP;
time_tai++;
@@ -418,7 +420,9 @@ int second_overflow(unsigned long secs)
}
break;
case TIME_DEL:
- if ((secs + 1) % 86400 == 0) {
+ if (!(time_status & STA_DEL))
+ time_state = TIME_OK;
+ else if ((secs + 1) % 86400 == 0) {
leap = 1;
time_tai--;
time_state = TIME_WAIT;