OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01bf0b6
)
KVM: take srcu lock before call to complete_pio()
author
Gleb Natapov
<gleb@redhat.com>
Tue, 9 Mar 2010 10:01:10 +0000
(12:01 +0200)
committer
Avi Kivity
<avi@redhat.com>
Tue, 20 Apr 2010 09:55:04 +0000
(12:55 +0300)
complete_pio() may use slot table which is protected by srcu.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index
24cd0ee
..
2eb999d
100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-4483,7
+4483,9
@@
int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
kvm_set_cr8(vcpu, kvm_run->cr8);
if (vcpu->arch.pio.cur_count) {
+ vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
r = complete_pio(vcpu);
+ srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
if (r)
goto out;
}