Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking

2016-06-01 Thread Mika Westerberg
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 t

Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking

2016-05-31 Thread Dima Stepanov
> @@ -21,6 +21,9 @@ static inline int do_sys_settimeofday(const struct timespec > *tv, > struct timespec64 ts64; > > if (!tv) > + return do_sys_settimeofday64(NULL, tz); > + > + if (tv && !timespec_valid(tv)) > return -EINVAL; Looks like an extr

[RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking

2016-05-31 Thread John Stultz
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