summaryrefslogtreecommitdiff
path: root/fs/select.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-09-04 04:45:17 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-20 00:56:01 +0300
commit3968cf623892d710e651070243fd16af312a9797 (patch)
tree273164e59b53074a9330aa12d2764d0fc28ea245 /fs/select.c
parentb8e8e1aa9f14110da180569908bbe538c9e9dc63 (diff)
downloadlinux-3968cf623892d710e651070243fd16af312a9797.tar.xz
get_compat_sigset()
similar to put_compat_sigset() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/select.c')
-rw-r--r--fs/select.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/select.c b/fs/select.c
index 20a7d061904f..9c980162c9fe 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -1301,7 +1301,6 @@ static long do_compat_pselect(int n, compat_ulong_t __user *inp,
struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask,
compat_size_t sigsetsize)
{
- compat_sigset_t ss32;
sigset_t ksigmask, sigsaved;
struct timespec64 ts, end_time, *to = NULL;
int ret;
@@ -1318,9 +1317,8 @@ static long do_compat_pselect(int n, compat_ulong_t __user *inp,
if (sigmask) {
if (sigsetsize != sizeof(compat_sigset_t))
return -EINVAL;
- if (copy_from_user(&ss32, sigmask, sizeof(ss32)))
+ if (get_compat_sigset(&ksigmask, sigmask))
return -EFAULT;
- sigset_from_compat(&ksigmask, &ss32);
sigdelsetmask(&ksigmask, sigmask(SIGKILL)|sigmask(SIGSTOP));
sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
@@ -1369,7 +1367,6 @@ COMPAT_SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds,
unsigned int, nfds, struct compat_timespec __user *, tsp,
const compat_sigset_t __user *, sigmask, compat_size_t, sigsetsize)
{
- compat_sigset_t ss32;
sigset_t ksigmask, sigsaved;
struct timespec64 ts, end_time, *to = NULL;
int ret;
@@ -1386,9 +1383,8 @@ COMPAT_SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds,
if (sigmask) {
if (sigsetsize != sizeof(compat_sigset_t))
return -EINVAL;
- if (copy_from_user(&ss32, sigmask, sizeof(ss32)))
+ if (get_compat_sigset(&ksigmask, sigmask))
return -EFAULT;
- sigset_from_compat(&ksigmask, &ss32);
sigdelsetmask(&ksigmask, sigmask(SIGKILL)|sigmask(SIGSTOP));
sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);