diff options
Diffstat (limited to 'recipes-kernel/linux/linux-3.12.27/linux-3.12-time-leap-second-v3.patch')
-rw-r--r-- | recipes-kernel/linux/linux-3.12.27/linux-3.12-time-leap-second-v3.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-3.12.27/linux-3.12-time-leap-second-v3.patch b/recipes-kernel/linux/linux-3.12.27/linux-3.12-time-leap-second-v3.patch new file mode 100644 index 0000000..1c329a2 --- /dev/null +++ b/recipes-kernel/linux/linux-3.12.27/linux-3.12-time-leap-second-v3.patch @@ -0,0 +1,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(); |