linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] posix-timers: fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME
@ 2018-06-18 14:07 Arnd Bergmann
  2018-06-18 14:08 ` [PATCH 2/3] time: use ktime_get_real_seconds() in time syscall Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-06-18 14:07 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: y2038, Arnd Bergmann, Ingo Molnar, Anna-Maria Gleixner,
	Deepa Dinamani, Rafael J. Wysocki, linux-kernel

Commit b5793b0d92c9 ("posix-timers: Make compat syscalls depend on
CONFIG_COMPAT_32BIT_TIME") added support for building the nanosleep
compat system call on 32-bit architectures, but missed one change
in nanosleep_copyout(), which would trigger a BUG() as soon as we
switch any architecture over to use it.

This makes sure the TT_COMPAT handler is available when we need it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 055a4a728c00..3e93c54bd3a1 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1659,7 +1659,7 @@ EXPORT_SYMBOL_GPL(hrtimer_init_sleeper);
 int nanosleep_copyout(struct restart_block *restart, struct timespec64 *ts)
 {
 	switch(restart->nanosleep.type) {
-#ifdef CONFIG_COMPAT
+#ifdef CONFIG_COMPAT_32BIT_TIME
 	case TT_COMPAT:
 		if (compat_put_timespec64(ts, restart->nanosleep.compat_rmtp))
 			return -EFAULT;
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-19  8:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18 14:07 [PATCH 1/3] posix-timers: fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME Arnd Bergmann
2018-06-18 14:08 ` [PATCH 2/3] time: use ktime_get_real_seconds() in time syscall Arnd Bergmann
2018-06-19  8:00   ` [tip:timers/core] time: Use " tip-bot for Arnd Bergmann
2018-06-18 14:08 ` [PATCH 3/3] timekeeping: use ktime_get_real_ts64() instead of getnstimeofday64() Arnd Bergmann
2018-06-19  8:01   ` [tip:timers/core] timekeeping: Use " tip-bot for Arnd Bergmann
2018-06-19  7:27 ` [tip:timers/urgent] posix-timers: Fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME tip-bot for Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).