Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1410743

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

From Dima Stepanov <dstepanov.src@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking
Date 2016-06-01 04:20 +0200
Message-ID <rF3Vf-2kL-1@gated-at.bofh.it> (permalink)
References <rEZyh-7VD-1@gated-at.bofh.it> <rEZyh-7VD-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> @@ -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 extra check for (tv), maybe it will be better to use:
  +       if (!timespec_valid(tv))

Regards, Dima.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 0/2] Fix for settimeofday() error checking regression John Stultz <john.stultz@linaro.org> - 2016-05-31 23:40 +0200
  [RFC][PATCH 1/2] time: Fix problematic change in settimeofday error checking John Stultz <john.stultz@linaro.org> - 2016-05-31 23:40 +0200
    Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday  error checking Dima Stepanov <dstepanov.src@gmail.com> - 2016-06-01 04:20 +0200
    Re: [RFC][PATCH 1/2] time: Fix problematic change in settimeofday  error checking Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-06-01 12:50 +0200
  [RFC][PATCH 2/2] kselftests: timers: Add set-tz test case John Stultz <john.stultz@linaro.org> - 2016-05-31 23:40 +0200

csiph-web