Skip to content

Commit

Permalink
KVM: fix i8259 oops when no vcpus are online
Browse files Browse the repository at this point in the history
If there are no vcpus, found will be NULL.  Check before doing anything with
it.

Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Avi Kivity authored and Marcelo Tosatti committed Sep 8, 2010
1 parent 16518d5 commit ae0635b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kvm/i8259.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit ae0635b

Please sign in to comment.