From 4e69e260328eb9020f25b5b6ddaa4a0c97530482 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 25 May 2011 13:25:48 +1000 Subject: [PATCH] Revert "KVM: add missing void __user * cast to access_ok() call" This reverts commit 95de6ce677d657a6cebbf9f3e194d91fe5687003. --- virt/kvm/kvm_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index b02a380052c..22cdb960660 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -651,8 +651,7 @@ int __kvm_set_memory_region(struct kvm *kvm, /* We can read the guest memory with __xxx_user() later on. */ if (user_alloc && ((mem->userspace_addr & (PAGE_SIZE - 1)) || - !access_ok(VERIFY_WRITE, (void __user *)mem->userspace_addr, - mem->memory_size))) + !access_ok(VERIFY_WRITE, mem->userspace_addr, mem->memory_size))) goto out; if (mem->slot >= KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS) goto out; -- 2.11.4.GIT