get_compat_sigset()

similar to put_compat_sigset()

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2017-09-03 21:45:17 -04:00
commit 3968cf6238
8 changed files with 28 additions and 51 deletions

View file

@ -2259,7 +2259,6 @@ COMPAT_SYSCALL_DEFINE6(epoll_pwait, int, epfd,
compat_size_t, sigsetsize)
{
long err;
compat_sigset_t csigmask;
sigset_t ksigmask, sigsaved;
/*
@ -2269,9 +2268,8 @@ COMPAT_SYSCALL_DEFINE6(epoll_pwait, int, epfd,
if (sigmask) {
if (sigsetsize != sizeof(compat_sigset_t))
return -EINVAL;
if (copy_from_user(&csigmask, sigmask, sizeof(csigmask)))
if (get_compat_sigset(&ksigmask, sigmask))
return -EFAULT;
sigset_from_compat(&ksigmask, &csigmask);
sigsaved = current->blocked;
set_current_blocked(&ksigmask);
}