aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-10-31 09:44:21 +0000
committerMark Brown <broonie@kernel.org>2014-10-31 09:44:21 +0000
commitff114805e1dc9b64c1f2e02fbb07a6ed309b18d8 (patch)
tree64407a783525686b864b3cd56292bf7e9d67d507 /virt
parentbfbceba4d4e9a3a538a80a1a0af18db55c9924a4 (diff)
parent816b571ac0e9eb9700df1ebc99702f9ad04e8607 (diff)
downloadlinux-linaro-stable-ff114805e1dc9b64c1f2e02fbb07a6ed309b18d8.tar.gz
Merge tag 'v3.10.59' into linux-linaro-lsk
This is the 3.10.59 stable release
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 9cae94206f41..4eed4cd9b58b 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -52,6 +52,7 @@
#include <asm/processor.h>
#include <asm/io.h>
+#include <asm/ioctl.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -1977,6 +1978,9 @@ static long kvm_vcpu_ioctl(struct file *filp,
if (vcpu->kvm->mm != current->mm)
return -EIO;
+ if (unlikely(_IOC_TYPE(ioctl) != KVMIO))
+ return -EINVAL;
+
#if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS)
/*
* Special cases: vcpu ioctls that are asynchronous to vcpu execution,