diff options
author | 2016-12-27 12:53:44 -0700 | |
---|---|---|
committer | 2016-12-27 12:53:44 -0700 | |
commit | 54ab6db0909061ab7ee07233d3cab86d29f86e6c (patch) | |
tree | a7650ab5c0fa3a6a3841de8e8693041b3e009054 /kernel/compat.c | |
parent | docs: sphinx-extensions: make rstFlatTable work with docutils 0.13 (diff) | |
parent | Linux 4.10-rc1 (diff) | |
download | wireguard-linux-54ab6db0909061ab7ee07233d3cab86d29f86e6c.tar.xz wireguard-linux-54ab6db0909061ab7ee07233d3cab86d29f86e6c.zip |
Merge tag 'v4.10-rc1' into docs-next
Linux 4.10-rc1
Diffstat (limited to 'kernel/compat.c')
-rw-r--r-- | kernel/compat.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 333d364be29d..19aec5d98108 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -28,7 +28,7 @@ #include <linux/ptrace.h> #include <linux/gfp.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> static int compat_get_timex(struct timex *txc, struct compat_timex __user *utp) { @@ -307,12 +307,17 @@ static inline long put_compat_itimerval(struct compat_itimerval __user *o, __put_user(i->it_value.tv_usec, &o->it_value.tv_usec))); } +asmlinkage long sys_ni_posix_timers(void); + COMPAT_SYSCALL_DEFINE2(getitimer, int, which, struct compat_itimerval __user *, it) { struct itimerval kit; int error; + if (!IS_ENABLED(CONFIG_POSIX_TIMERS)) + return sys_ni_posix_timers(); + error = do_getitimer(which, &kit); if (!error && put_compat_itimerval(it, &kit)) error = -EFAULT; @@ -326,6 +331,9 @@ COMPAT_SYSCALL_DEFINE3(setitimer, int, which, struct itimerval kin, kout; int error; + if (!IS_ENABLED(CONFIG_POSIX_TIMERS)) + return sys_ni_posix_timers(); + if (in) { if (get_compat_itimerval(&kin, in)) return -EFAULT; |