mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
HV: add NULL pointer check in 'vm_fixup()' function.
- to clear security warning. Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
parent
6d63cb3cba
commit
cb262286c6
@ -368,6 +368,11 @@ void vm_fixup(struct vm *vm)
|
||||
int i;
|
||||
|
||||
vm_desc = get_vm_desc(0);
|
||||
if (vm_desc == NULL) {
|
||||
pr_err("get VM0 description failed.");
|
||||
return;
|
||||
}
|
||||
|
||||
foreach_vcpu(i, vm, vcpu) {
|
||||
if (!vcpu_in_vm_desc(vcpu, vm_desc)) {
|
||||
pause_vcpu(vcpu, VCPU_ZOMBIE);
|
||||
|
Loading…
Reference in New Issue
Block a user