aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 7972e3aa2cae..cf6df5167af6 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -554,7 +554,9 @@ int kvm_read_guest_atomic(struct kvm *kvm, gpa_t gpa, void *data,
554 addr = gfn_to_hva(kvm, gfn); 554 addr = gfn_to_hva(kvm, gfn);
555 if (kvm_is_error_hva(addr)) 555 if (kvm_is_error_hva(addr))
556 return -EFAULT; 556 return -EFAULT;
557 pagefault_disable();
557 r = __copy_from_user_inatomic(data, (void __user *)addr + offset, len); 558 r = __copy_from_user_inatomic(data, (void __user *)addr + offset, len);
559 pagefault_enable();
558 if (r) 560 if (r)
559 return -EFAULT; 561 return -EFAULT;
560 return 0; 562 return 0;