mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Fedora Kernel Team <kernel-team@fedoraproject.org>
Subject: Re: missing leap second patches in stable.
Date: Sun, 17 Jun 2012 16:09:31 -0400	[thread overview]
Message-ID: <20120617200931.GA19482@redhat.com> (raw)
In-Reply-To: <20120616055007.GA5808@netboy.at.omicron.at>

On Sat, Jun 16, 2012 at 07:50:09AM +0200, Richard Cochran wrote:
 > On Fri, Jun 15, 2012 at 03:09:59PM -0400, Dave Jones wrote:
 > > On Fri, Jun 15, 2012 at 11:48:34AM -0700, John Stultz wrote:
 > >  > On 06/15/2012 08:20 AM, Dave Jones wrote:
 > >  > > Should these be in -stable ? Looks like all the other recent changes
 > >  > > in that area are present.  With the leap second just two weeks away,
 > >  > > it seems like they should be.
 > >  > >
 > >  > > Looks like 6b43ae8a619d17c4935c3320d2ef9e92bdeed05d is in 3.4-stable,
 > >  > > (haven't checked earlier -stable trees).
 > >  > 
 > >  > So the second patch has been sent out for stable review as of yesterday. 
 > >  > So it should be on its way, but you're right that I forgot to CC stable 
 > >  > on the first TAI offset fix.
 > >  > 
 > >  > I'll generate the patch and send it to Greg.  Thanks for the close 
 > >  > review here!
 > > 
 > > fwiw, I did a test on 3.5rc2 yesterday where I forced a fake leap second at midnight.
 > > Nothing untoward happened, unlike the previous ones :-)
 > 
 > Out of curiosity, how do you test that? Do you have any programs
 > specifically for testing the leap second issue?

no, I just patched the kernel to do this..

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 70b33ab..5f4a1f0 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -396,6 +396,13 @@ int second_overflow(unsigned long secs)
 
 	spin_lock_irqsave(&ntp_lock, flags);
 
+	if (time_state == TIME_OK) {
+		if (secs % 86400 == 0) {
+			printk("Faking leap second.\n");
+			time_state = TIME_INS;
+		}
+	}
+
 /*
  * Leap second processing. If in leap-insert state at the end of the
  * day, the system clock is set back one second; if in leap-delete


and then waited until midnight UTC, and then..

[68242.572516] Faking leap second.
[68242.573379] Clock: inserting leap second 23:59:60 UTC

	Dave


      reply	other threads:[~2012-06-17 20:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 15:20 Dave Jones
2012-06-15 18:48 ` John Stultz
2012-06-15 19:09   ` Dave Jones
2012-06-16  5:50     ` Richard Cochran
2012-06-17 20:09       ` Dave Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120617200931.GA19482@redhat.com \
    --to=davej@redhat.com \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@fedoraproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome