From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965024AbbBJOCE (ORCPT ); Tue, 10 Feb 2015 09:02:04 -0500 Received: from casper.infradead.org ([85.118.1.10]:59701 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932523AbbBJOCA (ORCPT ); Tue, 10 Feb 2015 09:02:00 -0500 Date: Tue, 10 Feb 2015 15:01:55 +0100 From: Peter Zijlstra To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, John Stultz , Thomas Gleixner , Miroslav Lichvar Subject: Re: [PATCH] time, ntp: Do not update time_state in middle of leap second Message-ID: <20150210140155.GA7119@twins.programming.kicks-ass.net> References: <1423333779-9857-1-git-send-email-prarit@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423333779-9857-1-git-send-email-prarit@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 07, 2015 at 01:29:39PM -0500, Prarit Bhargava wrote: > During leap second insertion testing it was noticed that a small window > exists where the time_state could be reset such that > time_state = TIME_OK, which then causes the leap second to not occur, or > causes the entire leap second state machine to fail. > > While this is highly unlikely to ever happen in the real world it is > still something we should protect against, as breaking the state machine > is obviously bad. > > If the time_state == TIME_OOP (ie, the leap second is in progress) do not > allow an external update to time_state. > > [v2]: Only block time_state change when TIME_OOP > > Signed-off-by: Prarit Bhargava > Cc: John Stultz > Cc: Thomas Gleixner > Cc: Miroslav Lichvar John, ACK?