diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-11-05 11:10:01 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-11-15 14:38:29 +0100 |
commit | 2a785996cc5e2fc1d1d29d196f530905f68d2dc2 (patch) | |
tree | 554fb14f12fba31cdc7a39b80ccc63ab1efdfed1 /kernel | |
parent | y2038: stat: avoid 'time_t' in 'struct stat' (diff) | |
download | linux-2a785996cc5e2fc1d1d29d196f530905f68d2dc2.tar.xz linux-2a785996cc5e2fc1d1d29d196f530905f68d2dc2.zip |
y2038: uapi: change __kernel_time_t to __kernel_old_time_t
This is mainly a patch for clarification, and to let us remove
the time_t definition from the kernel to prevent new users from
creeping in that might not be y2038-safe.
All remaining uses of 'time_t' or '__kernel_time_t' are part of
the user API that cannot be changed by that either have a
replacement or that do not suffer from the y2038 overflow.
Acked-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/time.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/time/time.c b/kernel/time/time.c index 96b8c02657ed..833abae3364f 100644 --- a/kernel/time/time.c +++ b/kernel/time/time.c @@ -59,9 +59,9 @@ EXPORT_SYMBOL(sys_tz); * why not move it into the appropriate arch directory (for those * architectures that need it). */ -SYSCALL_DEFINE1(time, time_t __user *, tloc) +SYSCALL_DEFINE1(time, __kernel_old_time_t __user *, tloc) { - time_t i = (time_t)ktime_get_real_seconds(); + __kernel_old_time_t i = (__kernel_old_time_t)ktime_get_real_seconds(); if (tloc) { if (put_user(i,tloc)) @@ -78,7 +78,7 @@ SYSCALL_DEFINE1(time, time_t __user *, tloc) * architectures that need it). */ -SYSCALL_DEFINE1(stime, time_t __user *, tptr) +SYSCALL_DEFINE1(stime, __kernel_old_time_t __user *, tptr) { struct timespec64 tv; int err; |