VirtualBox

Changeset 30055 in vbox for trunk


Ignore:
Timestamp:
Jun 7, 2010 8:27:00 AM (15 years ago)
Author:
vboxsync
Message:

VBoxSVC: Lock order fixes (+assert) for weird shutdown case where we have to clean up a SessionMachine or two. Needs reviewing.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r29971 r30055  
    97549754    mData.free();
    97559755
     9756#if 1 /** @todo Please review this change! (bird) */
     9757    /* drop the exclusive lock before setting the below two to NULL */
     9758    multilock.release();
     9759#else
    97569760    /* leave the exclusive lock before setting the below two to NULL */
    97579761    multilock.leave();
     9762#endif
    97589763
    97599764    unconst(mParent) = NULL;
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r29937 r30055  
    691691
    692692    LogFlowThisFunc(("Uninitializing machines (%d)...\n", m->ollMachines.size()));
    693     m->ollMachines.uninitAll();
     693    if (m->pHost)
     694    {
     695        /* It is necessary to hold the VirtualBox and Host locks here because
     696           we may have to uninitialize SessionMachines. */
     697        AutoMultiWriteLock2 multilock(this, m->pHost COMMA_LOCKVAL_SRC_POS);
     698        m->ollMachines.uninitAll();
     699    }
     700    else
     701        m->ollMachines.uninitAll();
    694702    m->ollFloppyImages.uninitAll();
    695703    m->ollDVDImages.uninitAll();
  • trunk/src/VBox/Main/glue/ErrorInfo.cpp

    r28800 r30055  
    135135        }
    136136    }
     137    /* Ignore failure when called after nsComponentManagerImpl::Shutdown(). */
     138    else if (rc == NS_ERROR_UNEXPECTED)
     139        rc = NS_OK;
    137140
    138141    AssertComRC (rc);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette