VirtualBox

Changeset 31387 in vbox


Ignore:
Timestamp:
Aug 5, 2010 10:13:58 AM (14 years ago)
Author:
vboxsync
Message:

Main: Lock order when saving host usb filters.

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

Legend:

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

    r31374 r31387  
    15141514    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    15151515
    1516     AutoReadLock alock(&m->usbListsLock COMMA_LOCKVAL_SRC_POS);
     1516    AutoReadLock alock1(this COMMA_LOCKVAL_SRC_POS);
     1517    AutoReadLock alock2(&m->usbListsLock COMMA_LOCKVAL_SRC_POS);
    15171518
    15181519    data.llUSBDeviceFilters.clear();
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r31372 r31387  
    32973297        // leave extra data alone, it's still in the config file
    32983298
    3299         /* host data (USB filters) */
    3300         rc = m->pHost->saveSettings(m->pMainConfigFile->host);
    3301         if (FAILED(rc)) throw rc;
     3299        /* host data (USB filters), will take host lock. */
     3300        {
     3301            mediaLock.release();
     3302            machinesLock.release();
     3303            rc = m->pHost->saveSettings(m->pMainConfigFile->host);
     3304            if (FAILED(rc)) throw rc;
     3305        }
    33023306
    33033307        rc = m->pSystemProperties->saveSettings(m->pMainConfigFile->systemProperties);
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