blob: 1c329a2f3e4d1382df274d93805daf16944ca836 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From: https://patchwork.kernel.org/patch/5819751/
Having observed leap second failing to change the clock after receiving the
message kernel: Clock: inserting leap second 23:59:60 UTC
in the kernel log this patch seemed promising. The pupose is to lock
out adjtimex changes during leap second, to prevent adjtimex from cancelling
leap second.
===========================================================================
From Prarit Bhargava - Feb. 20, 2015, 2:12 p.m.
I think setting it in the middle of the leap second should be a NOOP. We all
know how fragile this code has been in the past and allowing a state transition
at that particular time isn't a good idea given the outcome that the state may
remain TIME_INS.
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 28bf91c..6ff5cd5 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -535,7 +535,8 @@ void ntp_notify_cmos_timer(void) { }
static inline void process_adj_status(struct timex *txc, struct timespec64 *ts)
{
if ((time_status & STA_PLL) && !(txc->status & STA_PLL)) {
- time_state = TIME_OK;
+ if (time_state != TIME_OOP)
+ time_state = TIME_OK;
time_status = STA_UNSYNC;
/* restart PPS frequency calibration */
pps_reset_freq_interval();
|