VirtualBox

Changeset 24462 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 6, 2009 4:20:13 PM (15 years ago)
Author:
vboxsync
Message:

Main: fix deadlock discarding images

File:
1 edited

Legend:

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

    r24458 r24462  
    33063306
    33073307            hdFrom = this;
     3308
     3309            // deleteStorageAndWait calls unregisterWithVirtualBox which gets
     3310            // a write tree lock, so don't deadlock
     3311            treeLock.unlock();
     3312            alock.unlock();
    33083313
    33093314            rc = deleteStorageAndWait(&aProgress);
     
    40434048     * it holds a mVirtualBox lock too of course). */
    40444049
    4045     AutoWriteLock vboxLock(mVirtualBox);
    4046 
    4047     AutoWriteLock alock(this);
     4050    AutoMultiWriteLock2 alock(mVirtualBox->lockHandle(), this->lockHandle());
    40484051
    40494052    if (    !(m->formatObj->capabilities() & (   MediumFormatCapabilities_CreateDynamic
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