Skip to contentSkip to conversation

KVM: fix i8259 oops when no vcpus are online

PATCH New Avi Kivity 1 participant 1 message Aug 30, 2010

Subsystems (3)
lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 KVM: fix i8259 oops when no vcpus are online

If there are no vcpus, found will be NULL. Check before doing anything with it.

---
 arch/x86/kvm/i8259.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/x86/kvm/i8259.c +3 -0
index 5de9ee0..5662ff6 100644
@@ -64,6 +64,9 @@ static void pic_unlock(struct kvm_pic *s)
 		if (!found)
 			found = s->kvm->bsp_vcpu;
 
+		if (!found)
+			return;
+
 		kvm_vcpu_kick(found);
 	}
 }
Signature · 1 line
1.7.1