mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
This commit is contained in:
parent
afef05cf23
commit
6ff8473507
3 changed files with 16 additions and 14 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue