Author: grehan
Date: Thu Aug  1 05:59:28 2013
New Revision: 253854
URL: http://svnweb.freebsd.org/changeset/base/253854

Log:
  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

Modified:
  head/sys/amd64/vmm/vmm.c

Modified: head/sys/amd64/vmm/vmm.c
==============================================================================
--- head/sys/amd64/vmm/vmm.c    Thu Aug  1 05:50:42 2013        (r253853)
+++ head/sys/amd64/vmm/vmm.c    Thu Aug  1 05:59:28 2013        (r253854)
@@ -224,8 +224,13 @@ vmm_handler(module_t mod, int what, void
                        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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to