From: Avi Kivity Date: Tue, 27 Jul 2010 11:51:44 +0000 (+0300) Subject: KVM: fix i8259 oops when no vcpus are online X-Git-Tag: v2.6.36-rc4~15^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae0635b3580844e320a253a16985f4ce8b5bd0b6;p=thirdparty%2Fkernel%2Flinux.git KVM: fix i8259 oops when no vcpus are online If there are no vcpus, found will be NULL. Check before doing anything with it. Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 8d10c063d7f20..4b7b73ce20989 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -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); } }