diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-05-31 04:42:07 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-06-09 23:51:38 -0400 |
commit | 8f13621abcedb278cfecf9703583743f9c474c97 (patch) | |
tree | a235b2e6a8e5a071678853f0d74f5430a0f0dad6 /kernel/signal.c | |
parent | d9e968cb9f849770288f5fde3d8d3a5f7e339052 (diff) | |
download | linux-8f13621abcedb278cfecf9703583743f9c474c97.tar.gz linux-8f13621abcedb278cfecf9703583743f9c474c97.tar.bz2 linux-8f13621abcedb278cfecf9703583743f9c474c97.zip |
sigpending(): move compat to native
... and kill set_fs() use
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index d1eed0d7ca64..6237f492adfc 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3254,6 +3254,18 @@ SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set) return sys_rt_sigpending((sigset_t __user *)set, sizeof(old_sigset_t)); } +#ifdef CONFIG_COMPAT +COMPAT_SYSCALL_DEFINE1(sigpending, compat_old_sigset_t __user *, set32) +{ + sigset_t set; + int err = do_sigpending(&set, sizeof(old_sigset_t)); + if (err == 0) + if (copy_to_user(set32, &set, sizeof(old_sigset_t))) + err = -EFAULT; + return err; +} +#endif + #endif #ifdef __ARCH_WANT_SYS_SIGPROCMASK |