projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31bb117
)
KVM: Disable pagefaults during copy_from_user_inatomic()
author
Andrea Arcangeli
<andrea@qumranet.com>
Wed, 30 Jan 2008 18:57:35 +0000
(19:57 +0100)
committer
Avi Kivity
<avi@qumranet.com>
Sun, 27 Apr 2008 08:53:18 +0000
(11:53 +0300)
With CONFIG_PREEMPT=n, this is needed in order to disable the fault-in
code from sleeping.
Signed-off-by: Andrea Arcangeli <andrea@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
virt/kvm/kvm_main.c
patch
|
blob
|
blame
|
history
diff --git
a/virt/kvm/kvm_main.c
b/virt/kvm/kvm_main.c
index 7972e3aa2caedd85f47ed7a8aef7e9ff1b455918..cf6df5167af62fd0f9b89b2e52f10aacab4a181f 100644
(file)
--- 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,
addr = gfn_to_hva(kvm, gfn);
if (kvm_is_error_hva(addr))
return -EFAULT;
+ pagefault_disable();
r = __copy_from_user_inatomic(data, (void __user *)addr + offset, len);
+ pagefault_enable();
if (r)
return -EFAULT;
return 0;