diff options
| -rw-r--r-- | virt/kvm/kvm_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 1c6e8476b244..ff42b11d2b9c 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
| @@ -52,6 +52,7 @@ | |||
| 52 | 52 | ||
| 53 | #include <asm/processor.h> | 53 | #include <asm/processor.h> |
| 54 | #include <asm/io.h> | 54 | #include <asm/io.h> |
| 55 | #include <asm/ioctl.h> | ||
| 55 | #include <asm/uaccess.h> | 56 | #include <asm/uaccess.h> |
| 56 | #include <asm/pgtable.h> | 57 | #include <asm/pgtable.h> |
| 57 | 58 | ||
| @@ -2032,6 +2033,9 @@ static long kvm_vcpu_ioctl(struct file *filp, | |||
| 2032 | if (vcpu->kvm->mm != current->mm) | 2033 | if (vcpu->kvm->mm != current->mm) |
| 2033 | return -EIO; | 2034 | return -EIO; |
| 2034 | 2035 | ||
| 2036 | if (unlikely(_IOC_TYPE(ioctl) != KVMIO)) | ||
| 2037 | return -EINVAL; | ||
| 2038 | |||
| 2035 | #if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS) | 2039 | #if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS) |
| 2036 | /* | 2040 | /* |
| 2037 | * Special cases: vcpu ioctls that are asynchronous to vcpu execution, | 2041 | * Special cases: vcpu ioctls that are asynchronous to vcpu execution, |
