提交 ae0635b3 编写于 作者: A Avi Kivity 提交者: Marcelo Tosatti

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: NAvi Kivity <avi@redhat.com>
上级 16518d5a
...@@ -64,6 +64,9 @@ static void pic_unlock(struct kvm_pic *s) ...@@ -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);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册