diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-03 21:45:17 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-19 17:56:01 -0400 |
commit | 3968cf623892d710e651070243fd16af312a9797 (patch) | |
tree | 273164e59b53074a9330aa12d2764d0fc28ea245 /fs/signalfd.c | |
parent | b8e8e1aa9f14110da180569908bbe538c9e9dc63 (diff) |
get_compat_sigset()
similar to put_compat_sigset()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/signalfd.c')
-rw-r--r-- | fs/signalfd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c index d2c434112f42..9de5beeb771d 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
@@ -312,15 +312,13 @@ COMPAT_SYSCALL_DEFINE4(signalfd4, int, ufd, | |||
312 | compat_size_t, sigsetsize, | 312 | compat_size_t, sigsetsize, |
313 | int, flags) | 313 | int, flags) |
314 | { | 314 | { |
315 | compat_sigset_t ss32; | ||
316 | sigset_t tmp; | 315 | sigset_t tmp; |
317 | sigset_t __user *ksigmask; | 316 | sigset_t __user *ksigmask; |
318 | 317 | ||
319 | if (sigsetsize != sizeof(compat_sigset_t)) | 318 | if (sigsetsize != sizeof(compat_sigset_t)) |
320 | return -EINVAL; | 319 | return -EINVAL; |
321 | if (copy_from_user(&ss32, sigmask, sizeof(ss32))) | 320 | if (get_compat_sigset(&tmp, sigmask)) |
322 | return -EFAULT; | 321 | return -EFAULT; |
323 | sigset_from_compat(&tmp, &ss32); | ||
324 | ksigmask = compat_alloc_user_space(sizeof(sigset_t)); | 322 | ksigmask = compat_alloc_user_space(sizeof(sigset_t)); |
325 | if (copy_to_user(ksigmask, &tmp, sizeof(sigset_t))) | 323 | if (copy_to_user(ksigmask, &tmp, sizeof(sigset_t))) |
326 | return -EFAULT; | 324 | return -EFAULT; |