lkml.org 
[lkml]   [2015]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] ntp:Change the type of time_reftime and replace get_seconds()
Date
The type of ntp static variant "time_reftime" and the type of get_seconds()'s
return value are both unsign long now, which may cause y2038 problem on 32bit systems.

So change time_reftime' type to time64_t, and replace get_seconds with
ktime_get_real_seconds() in ntp.
ktime_get_real_seconds() does the same thing as get_seconds() and is y2038 safe,
but ktime_get_real_seconds holds the timekeeping lock which is also held by the ntp code.
We need timekeeping to provide a none lock version of ktime_get_real_seconds
before we can start to solve the ntp.c's y2038 problem.

The [PATCH 1/2] provides the internal none lock version function.
The [PATCH 2/2] does the real fix.

DengChao (2):
timekeeping: Provide internal function __ktime_get_real_seconds
ntp:Change the type of time_reftime to time64_t and replace
get_seconds with __ktime_get_real_seconds

kernel/time/ntp.c | 10 ++++++----
kernel/time/timekeeping.c | 13 +++++++++++++
kernel/time/timekeeping_internal.h | 2 ++
3 files changed, 21 insertions(+), 4 deletions(-)

--
1.9.1



\
 
 \ /
  Last update: 2015-10-26 16:41    [W:0.026 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site