Commit ae0635b3 authored by Avi Kivity's avatar Avi Kivity Committed by Marcelo Tosatti
Browse files

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: default avatarAvi Kivity <avi@redhat.com>
parent 16518d5a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
	}
}