[lkml]   [2017]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 7/7] Change k_clock nsleep() to use timespec64
On Sun, Mar 19, 2017 at 4:57 AM, Deepa Dinamani <> wrote:
> From: Deepa Dinamani <>
> struct timespec is not y2038 safe. The plan is to
> get rid of all uses of timespec internally in the
> kernel. Replace uses of timespec with timespec64.
> The syscall interfaces themselves will be changed
> in a separate series.
> Signed-off-by: Deepa Dinamani <>

It's worth pointing out here that this patch only does half the job:

> index f608941..97a883a 100644
> --- a/include/linux/posix-timers.h
> +++ b/include/linux/posix-timers.h
> @@ -94,7 +94,7 @@ struct k_clock {
> int (*clock_adj) (const clockid_t which_clock, struct timex *tx);
> int (*timer_create) (struct k_itimer *timer);
> int (*nsleep) (const clockid_t which_clock, int flags,
> - struct timespec *, struct timespec __user *);
> + struct timespec64 *, struct timespec __user *);
> long (*nsleep_restart) (struct restart_block *restart_block);

You change one of the two arguments, but not the second one
or the code in the restart handler that uses that __user pointer.

Your patch is a good step in the right direction, and the second half
of it is definitely complicated enough to be done in a separate
patch, so I think it's good to keep them separate, just add
explain why this is done one at a time.


 \ /
  Last update: 2017-03-21 10:17    [W:0.087 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site