[alsa-devel] Signed-off-by: lsh <410860423@qq.com>
diff mbox series

Message ID 94b6bb5f3ba41fe87bf5207e08f75e8dfe17ef18.1563599043.git.410860423@qq.com
State New
Headers show
Series
  • [alsa-devel] Signed-off-by: lsh <410860423@qq.com>
Related show

Commit Message

lsh July 20, 2019, 6:17 a.m. UTC
From: lsh <410860423@qq.com>

Modification of leap seconds from 58 59 59 00 to 58 59 00 00
---
 kernel/time/ntp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Stultz July 22, 2019, 5:59 p.m. UTC | #1
On Fri, Jul 19, 2019 at 11:35 PM lsh <linsheng_111@163.com> wrote:
>
> From: lsh <410860423@qq.com>
>
> Modification of leap seconds from 58 59 59 00 to 58 59 00 00

In the future, on other patches, you should provide a rational for
*why* you are submitting this change, not what the change does.

As for this patch, it would be a bad change, as this changes the
established behavior that the repeating 59th second w/ the TIME_OOP
flag set is the 60th/leap second and would break any apps that care to
actually watch for the leap second. Your change would cause
applications that do not care about leapseconds which have timers set
to the 00:00:00 UTC to fire a second early.

thanks
-john

Patch
diff mbox series

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 65eb796..7edae41 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -425,7 +425,6 @@  int second_overflow(time64_t secs)
 			ntp_next_leap_sec = TIME64_MAX;
 			time_state = TIME_OK;
 		} else if (secs == ntp_next_leap_sec) {
-			leap = -1;
 			time_state = TIME_OOP;
 			printk(KERN_NOTICE
 				"Clock: inserting leap second 23:59:60 UTC\n");
@@ -444,6 +443,7 @@  int second_overflow(time64_t secs)
 		}
 		break;
 	case TIME_OOP:
+		leap = -1;
 		ntp_next_leap_sec = TIME64_MAX;
 		time_state = TIME_WAIT;
 		break;