KVM: fix i8259 oops when no vcpus are online
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.
Signed-off-by Avi Kivity <[email protected]>
--- arch/x86/kvm/i8259.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/x86/kvm/i8259.c +3 -0
@@ -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