[PATCH 0/2] ntp:Change the type of time_reftime and replace get_seconds()

From: DengChao
Date: Sat Dec 12 2015 - 23:24:47 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/