diff options
author | Deepa Dinamani <deepa.kernel@gmail.com> | 2018-06-17 08:11:44 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-06-24 15:39:47 +0300 |
commit | 6ff84735070276d72af716e21c3214ee20d60e70 (patch) | |
tree | c01318c2ab8bd85792d81d50104541468706fcd3 /fs/timerfd.c | |
parent | afef05cf238cfcecdc5ea9b06f31027b13ce6214 (diff) | |
download | linux-6ff84735070276d72af716e21c3214ee20d60e70.tar.xz |
time: Change types to new y2038 safe __kernel_itimerspec
timer_set/gettime and timerfd_set/get apis use struct itimerspec at the
user interface layer. struct itimerspec is not y2038-safe. Change these
interfaces to use y2038-safe struct __kernel_itimerspec instead. This will
help define new syscalls when 32bit architectures select CONFIG_64BIT_TIME.
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: arnd@arndb.de
Cc: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-api@vger.kernel.org
Cc: y2038@lists.linaro.org
Link: https://lkml.kernel.org/r/20180617051144.29756-4-deepa.kernel@gmail.com
Diffstat (limited to 'fs/timerfd.c')
-rw-r--r-- | fs/timerfd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c index d84a2bee4f82..8bb926253f88 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -533,8 +533,8 @@ static int do_timerfd_gettime(int ufd, struct itimerspec64 *t) } SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, - const struct itimerspec __user *, utmr, - struct itimerspec __user *, otmr) + const struct __kernel_itimerspec __user *, utmr, + struct __kernel_itimerspec __user *, otmr) { struct itimerspec64 new, old; int ret; @@ -550,7 +550,7 @@ SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, return ret; } -SYSCALL_DEFINE2(timerfd_gettime, int, ufd, struct itimerspec __user *, otmr) +SYSCALL_DEFINE2(timerfd_gettime, int, ufd, struct __kernel_itimerspec __user *, otmr) { struct itimerspec64 kotmr; int ret = do_timerfd_gettime(ufd, &kotmr); @@ -559,7 +559,7 @@ SYSCALL_DEFINE2(timerfd_gettime, int, ufd, struct itimerspec __user *, otmr) return put_itimerspec64(&kotmr, otmr) ? -EFAULT : 0; } -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_32BIT_TIME COMPAT_SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, const struct compat_itimerspec __user *, utmr, struct compat_itimerspec __user *, otmr) |