From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757886AbcFAKtq (ORCPT ); Wed, 1 Jun 2016 06:49:46 -0400 Received: from mga02.intel.com ([134.134.136.20]:57510 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751303AbcFAKto (ORCPT ); Wed, 1 Jun 2016 06:49:44 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,400,1459839600"; d="scan'208";a="712161739" Date: Wed, 1 Jun 2016 13:49:39 +0300 From: Mika Westerberg To: John Stultz Cc: linux-kernel@vger.kernel.org, Baolin Wang , Thomas Gleixner , Shuah Khan , Arnd Bergmann , Ingo Molnar , Richard Cochran , Prarit Bhargava Subject: Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking Message-ID: <20160601104939.GT1743@lahna.fi.intel.com> References: <1464730335-21427-1-git-send-email-john.stultz@linaro.org> <1464730335-21427-2-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464730335-21427-2-git-send-email-john.stultz@linaro.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 31, 2016 at 02:32:14PM -0700, John Stultz wrote: > In commit 86d3473224b0 ("time: Introduce do_sys_settimeofday64()") > some of the checking for a valid timeval was subtley changed > which caused -EINVAL to be returned whenever the timeval was null. > > However, it is possible to set the timezone data while specifying > a NULL timeval, which is usually done to handle systems where the > RTC keeps local time instead of UTC. Thus the patch causes such > systems to have the time incorrectly set. > > This patch addresses the issue by handling the error conditionals > in the same way as was done previously. > > Cc: Mika Westerberg > Cc: Baolin Wang > Cc: Thomas Gleixner > Cc: Shuah Khan > Cc: Arnd Bergmann > Cc: Ingo Molnar > Cc: Richard Cochran > Cc: Prarit Bhargava > Reported-by: Mika Westerberg I can confirm that this patch fixes the issue I'm seeing. Thanks! Tested-by: Mika Westerberg