linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Richard Cochran <richardcochran@gmail.com>
Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/1] ntp: advertise correct TAI offset during leap second
Date: Thu, 03 May 2012 11:54:36 -0700	[thread overview]
Message-ID: <4FA2D46C.2040404@linaro.org> (raw)
In-Reply-To: <7af92d6eabef55ddce07007ea515eda2e1474c52.1335442155.git.richardcochran@gmail.com>

On 04/26/2012 05:11 AM, Richard Cochran wrote:
> When repeating a UTC time value during a leap second (when the UTC
> time should be 23:59:60), the TAI timescale should not stop. The kernel
> NTP code increments the TAI offset one second too late. This patch fixes
> the issue by incrementing the offset during the leap second itself.

Got a chance to look at this closer and I agree its the right fix.  So 
its queued.
thanks
-john

> Signed-off-by: Richard Cochran<richardcochran@gmail.com>
> ---
>   kernel/time/ntp.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
> index f03fd83..e8c8671 100644
> --- a/kernel/time/ntp.c
> +++ b/kernel/time/ntp.c
> @@ -412,6 +412,7 @@ int second_overflow(unsigned long secs)
>   		if (secs % 86400 == 0) {
>   			leap = -1;
>   			time_state = TIME_OOP;
> +			time_tai++;
>   			printk(KERN_NOTICE
>   				"Clock: inserting leap second 23:59:60 UTC\n");
>   		}
> @@ -426,7 +427,6 @@ int second_overflow(unsigned long secs)
>   		}
>   		break;
>   	case TIME_OOP:
> -		time_tai++;
>   		time_state = TIME_WAIT;
>   		break;
>


      parent reply	other threads:[~2012-05-03 18:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 12:11 [PATCH 0/1] ntp bug fix Richard Cochran
2012-04-26 12:11 ` [PATCH 1/1] ntp: advertise correct TAI offset during leap second Richard Cochran
2012-04-27 22:23   ` John Stultz
2012-04-28  6:17     ` Richard Cochran
2012-04-30 19:48       ` John Stultz
2012-05-01  6:16         ` Richard Cochran
2012-05-05 10:02           ` Richard Cochran
2012-05-05 19:27             ` John Stultz
2012-05-03 18:54   ` John Stultz [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=4FA2D46C.2040404@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).