diff options
author | Arnd Bergmann <[email protected]> | 2018-06-18 16:07:59 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2018-06-19 09:23:19 +0200 |
commit | 0fe2795516b9e1c59b58b02bdf8658698117ec4e (patch) | |
tree | 8952d7ec6168e25f40e3f9939fd2cce4037c888f | |
parent | a26ed66c20f080c510fcf5bd448bce204f2c19d7 (diff) |
posix-timers: Fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME
Commit b5793b0d92c9 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 any architecture is switched over to
use it.
Use the proper config symbol to enable the code path.
Fixes: Commit b5793b0d92c9 ("posix-timers: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: Anna-Maria Gleixner <[email protected]>
Cc: Deepa Dinamani <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r-- | kernel/time/hrtimer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |