forked from Minki/linux
posix-timers: Fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME
Commitb5793b0d92
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: Commitb5793b0d92
("posix-timers: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: y2038@lists.linaro.org Cc: Anna-Maria Gleixner <anna-maria@linutronix.de> Cc: Deepa Dinamani <deepa.kernel@gmail.com> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Link: https://lkml.kernel.org/r/20180618140811.2998503-1-arnd@arndb.de
This commit is contained in:
parent
a26ed66c20
commit
0fe2795516
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user