Skip to content

Commit 0fe2795

Browse files
arndbKAGA-KOKO
authored andcommitted
posix-timers: Fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME
Commit b5793b0 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 b5793b0 ("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]
1 parent a26ed66 commit 0fe2795

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/time/hrtimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ EXPORT_SYMBOL_GPL(hrtimer_init_sleeper);
16591659
int nanosleep_copyout(struct restart_block *restart, struct timespec64 *ts)
16601660
{
16611661
switch(restart->nanosleep.type) {
1662-
#ifdef CONFIG_COMPAT
1662+
#ifdef CONFIG_COMPAT_32BIT_TIME
16631663
case TT_COMPAT:
16641664
if (compat_put_timespec64(ts, restart->nanosleep.compat_rmtp))
16651665
return -EFAULT;

0 commit comments

Comments
 (0)