summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-10-25 22:56:17 +0200
committerArnd Bergmann <arnd@arndb.de>2019-11-15 14:38:29 +0100
commit75d319c06e6a76f67549c0ae1007dc3167804f4e (patch)
tree5aed38b6b958308fe83e580a6222767a91bd2b1e /kernel
parenty2038: rusage: use __kernel_old_timeval (diff)
downloadlinux-75d319c06e6a76f67549c0ae1007dc3167804f4e.tar.xz
linux-75d319c06e6a76f67549c0ae1007dc3167804f4e.zip
y2038: syscalls: change remaining timeval to __kernel_old_timeval
All of the remaining syscalls that pass a timeval (gettimeofday, utime, futimesat) can trivially be changed to pass a __kernel_old_timeval instead, which has a compatible layout, but avoids ambiguity with the timeval type in user space. Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/power.h2
-rw-r--r--kernel/time/time.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index 44bee462ff57..7cdc64dc2373 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -179,7 +179,7 @@ extern void swsusp_close(fmode_t);
extern int swsusp_unmark(void);
#endif
-struct timeval;
+struct __kernel_old_timeval;
/* kernel/power/swsusp.c */
extern void swsusp_show_speed(ktime_t, ktime_t, unsigned int, char *);
diff --git a/kernel/time/time.c b/kernel/time/time.c
index 833abae3364f..a0e7b9909f2d 100644
--- a/kernel/time/time.c
+++ b/kernel/time/time.c
@@ -137,7 +137,7 @@ SYSCALL_DEFINE1(stime32, old_time32_t __user *, tptr)
#endif /* __ARCH_WANT_SYS_TIME32 */
#endif
-SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv,
+SYSCALL_DEFINE2(gettimeofday, struct __kernel_old_timeval __user *, tv,
struct timezone __user *, tz)
{
if (likely(tv != NULL)) {