Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking
From: Mika Westerberg
Date: Wed Jun 01 2016 - 06:49:48 EST
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 <mika.westerberg@xxxxxxxxxxxxxxx>
> Cc: Baolin Wang <baolin.wang@xxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Shuah Khan <shuahkh@xxxxxxxxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Richard Cochran <richardcochran@xxxxxxxxx>
> Cc: Prarit Bhargava <prarit@xxxxxxxxxx>
> Reported-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
I can confirm that this patch fixes the issue I'm seeing. Thanks!
Tested-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>