mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Bohac <jbohac@suse.cz>
To: Jiri Bohac <jbohac@suse.cz>
Cc: John Stultz <john.stultz@linaro.org>,
	Roman Zippel <zippel@linux-m68k.org>,
	Prarit Bhargava <prarit@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Miroslav Lichvar <mlichvar@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] time, ntp: Do not update time_state in middle of leap second [v3]
Date: Wed, 18 Feb 2015 18:38:52 +0100	[thread overview]
Message-ID: <20150218173852.GB31353@midget.suse.cz> (raw)
In-Reply-To: <20150218171404.GA31353@midget.suse.cz>

On Wed, Feb 18, 2015 at 06:14:04PM +0100, Jiri Bohac wrote:
> I think the only real problem occurs when the adjtimex is called in the
> the TIME_OOP state 

... or the TIME_WAIT state ... 

> with STA_PLL cleared  _and_ STA_INS set.
> In this case the state machine is reset to TIME_OK but goes back
> to TIME_INS on the next second_overflow, potentially causing
> another false leap second to be inserted on the following
> midnight.
> 
> The state machine is meant to only go back to TIME_INS once STA_INS is
> cleared and then set again - this is what the TIME_WAIT state is
> for.
> 
> In fact, I don't see a reason why the STA_PLL -> !STA_PLL transition should 
> ever set the time_state to TIME_OK.
> - When the STA_INS/STA_DEL flag is removed from the status, the state
>   machine will end up in TIME_OK from any state.
> - When STA_INS/STA_DEL is set in
>   the status, the state mchine will transition from TIME_OK to
>   TIME_INS/TIME_DEL anyway.
> 
> I think the "time_status = TIME_OK" should be just dropped.
> 
> It has been added by eea83d896e318bda54be2d2770d2c5d6668d11db
> (ntp: NTP4 user space bits update) and it's not clear why.
> Roman?

-- 
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ


  reply	other threads:[~2015-02-18 17:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 13:58 Prarit Bhargava
2015-02-17 23:16 ` John Stultz
2015-02-18 17:14   ` Jiri Bohac
2015-02-18 17:38     ` Jiri Bohac [this message]
2015-02-20 14:12   ` Prarit Bhargava
2015-02-19 17:00 ` Jiri Bohac
2015-02-20 14:15   ` Prarit Bhargava
2015-02-20 17:19     ` Jiri Bohac

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=20150218173852.GB31353@midget.suse.cz \
    --to=jbohac@suse.cz \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlichvar@redhat.com \
    --cc=peterz@infradead.org \
    --cc=prarit@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=zippel@linux-m68k.org \
    /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

all inboxes | Powered by JetHome®