diff options
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 8d0b7c16c2f7..3c4fe26096fc 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -165,6 +165,7 @@ static struct kvm *kvm_create_vm(void) | |||
165 | 165 | ||
166 | kvm->mm = current->mm; | 166 | kvm->mm = current->mm; |
167 | atomic_inc(&kvm->mm->mm_count); | 167 | atomic_inc(&kvm->mm->mm_count); |
168 | spin_lock_init(&kvm->mmu_lock); | ||
168 | kvm_io_bus_init(&kvm->pio_bus); | 169 | kvm_io_bus_init(&kvm->pio_bus); |
169 | mutex_init(&kvm->lock); | 170 | mutex_init(&kvm->lock); |
170 | kvm_io_bus_init(&kvm->mmio_bus); | 171 | kvm_io_bus_init(&kvm->mmio_bus); |
@@ -552,9 +553,7 @@ int kvm_read_guest_atomic(struct kvm *kvm, gpa_t gpa, void *data, | |||
552 | addr = gfn_to_hva(kvm, gfn); | 553 | addr = gfn_to_hva(kvm, gfn); |
553 | if (kvm_is_error_hva(addr)) | 554 | if (kvm_is_error_hva(addr)) |
554 | return -EFAULT; | 555 | return -EFAULT; |
555 | pagefault_disable(); | ||
556 | r = __copy_from_user_inatomic(data, (void __user *)addr + offset, len); | 556 | r = __copy_from_user_inatomic(data, (void __user *)addr + offset, len); |
557 | pagefault_enable(); | ||
558 | if (r) | 557 | if (r) |
559 | return -EFAULT; | 558 | return -EFAULT; |
560 | return 0; | 559 | return 0; |