Moved clearing of vmm_initialized to avoid the case

of unloading the module while VMs existed. This would
result in EBUSY, but would prevent further operations
on VMs resulting in the module being impossible to
unload.

Submitted by:   Tycho Nightingale (tycho.nightingale <at> plurisbusnetworks.com)
Reviewed by:	grehan, neel
This commit is contained in:
Peter Grehan 2013-08-01 05:59:28 +00:00
parent 4b00159792
commit 81ef6611ed

View File

@ -224,8 +224,13 @@ vmm_handler(module_t mod, int what, void *arg)
iommu_cleanup();
vmm_ipi_cleanup();
error = VMM_CLEANUP();
/*
* Something bad happened - prevent new
* VMs from being created
*/
if (error)
vmm_initialized = 0;
}
vmm_initialized = 0;
break;
default:
error = 0;