mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
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 <avi@redhat.com>
This commit is contained in:
parent
16518d5ada
commit
ae0635b358
@ -64,6 +64,9 @@ static void pic_unlock(struct kvm_pic *s)
|
|||||||
if (!found)
|
if (!found)
|
||||||
found = s->kvm->bsp_vcpu;
|
found = s->kvm->bsp_vcpu;
|
||||||
|
|
||||||
|
if (!found)
|
||||||
|
return;
|
||||||
|
|
||||||
kvm_vcpu_kick(found);
|
kvm_vcpu_kick(found);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user