[Bug,206579] KVM with passthrough generates "BUG: kernel NULL pointer dereference" and crashes
diff mbox series

Message ID bug-206579-28872-LecNbHMnsz@https.bugzilla.kernel.org/
State New
Headers show
Series
  • [Bug,206579] KVM with passthrough generates "BUG: kernel NULL pointer dereference" and crashes
Related show

Commit Message

bugzilla-daemon@bugzilla.kernel.org Feb. 21, 2020, 9:27 p.m. UTC
https://bugzilla.kernel.org/show_bug.cgi?id=206579

--- Comment #6 from Paolo Bonzini (bonzini@gnu.org) ---
This is untested, but based on the crash dump it seems like the ir_list is
uninitialized.  Can you try this:

Patch
diff mbox series

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 4b19188faaae..92afca7c252a 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2206,7 +2206,7 @@  static int avic_init_vcpu(struct vcpu_svm *svm)
 {
        int ret;

-       if (!kvm_vcpu_apicv_active(&svm->vcpu))
+       if (!avic)
                return 0;

        ret = avic_init_backing_page(&svm->vcpu);