mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
hv: fix vulnerability when VM is destroyed
In hypervisor fuzzing test, hypervisor will hang if issuing HV_VM_SET_MEMORY_REGIONS hypercall after target VM is destroyed. this patch is to fix above vulnerability. Tracked-On: #2849 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
5a7be9b869
commit
868778a68b
@@ -448,6 +448,8 @@ int32_t shutdown_vm(struct acrn_vm *vm)
|
||||
|
||||
/* Only allow shutdown paused vm */
|
||||
if (vm->state == VM_PAUSED) {
|
||||
vm->state = VM_STATE_INVALID;
|
||||
|
||||
foreach_vcpu(i, vm, vcpu) {
|
||||
reset_vcpu(vcpu);
|
||||
offline_vcpu(vcpu);
|
||||
|
Reference in New Issue
Block a user