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 /virt | |
parent | b8e8e1aa9f14110da180569908bbe538c9e9dc63 (diff) | |
download | linux-3968cf623892d710e651070243fd16af312a9797.tar.gz linux-3968cf623892d710e651070243fd16af312a9797.tar.bz2 linux-3968cf623892d710e651070243fd16af312a9797.zip |
get_compat_sigset()
similar to put_compat_sigset()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 9deb5a245b83..99bfe50a0589 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -2724,7 +2724,6 @@ static long kvm_vcpu_compat_ioctl(struct file *filp, case KVM_SET_SIGNAL_MASK: { struct kvm_signal_mask __user *sigmask_arg = argp; struct kvm_signal_mask kvm_sigmask; - compat_sigset_t csigset; sigset_t sigset; if (argp) { @@ -2733,13 +2732,11 @@ static long kvm_vcpu_compat_ioctl(struct file *filp, sizeof(kvm_sigmask))) goto out; r = -EINVAL; - if (kvm_sigmask.len != sizeof(csigset)) + if (kvm_sigmask.len != sizeof(compat_sigset_t)) goto out; r = -EFAULT; - if (copy_from_user(&csigset, sigmask_arg->sigset, - sizeof(csigset))) + if (get_compat_sigset(&sigset, (void *)sigmask_arg->sigset)) goto out; - sigset_from_compat(&sigset, &csigset); r = kvm_vcpu_ioctl_set_sigmask(vcpu, &sigset); } else r = kvm_vcpu_ioctl_set_sigmask(vcpu, NULL); |