File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -8783,9 +8783,17 @@ static void post_kvm_run_save(struct kvm_vcpu *vcpu)
8783
8783
8784
8784
kvm_run -> cr8 = kvm_get_cr8 (vcpu );
8785
8785
kvm_run -> apic_base = kvm_get_apic_base (vcpu );
8786
+
8787
+ /*
8788
+ * The call to kvm_ready_for_interrupt_injection() may end up in
8789
+ * kvm_xen_has_interrupt() which may require the srcu lock to be
8790
+ * held, to protect against changes in the vcpu_info address.
8791
+ */
8792
+ vcpu -> srcu_idx = srcu_read_lock (& vcpu -> kvm -> srcu );
8786
8793
kvm_run -> ready_for_interrupt_injection =
8787
8794
pic_in_kernel (vcpu -> kvm ) ||
8788
8795
kvm_vcpu_ready_for_interrupt_injection (vcpu );
8796
+ srcu_read_unlock (& vcpu -> kvm -> srcu , vcpu -> srcu_idx );
8789
8797
8790
8798
if (is_smm (vcpu ))
8791
8799
kvm_run -> flags |= KVM_RUN_X86_SMM ;
You can’t perform that action at this time.
0 commit comments