[vbox-dev] Fix to #13801

a.urakov at drweb.com a.urakov at drweb.com
Fri Jan 30 14:53:57 UTC 2015


We would like to contribute to VirtualBox under MIT license. We send our 
changes to fix bug described at https://www.virtualbox.org/ticket/13801 .

The idea is that there is no need to hold write lock on parent medium to 
change its locking type. In current version we unlock all session locked 
list first and only then we update locking type. But in this case only 
element of /pMediumLockList/ is changed, not /Medium/ object. May be 
parent write-locking code left after old version, where parent lock type 
updating looked like this (version /3.1.8/):

ComObjPtr<Medium> parent = pMedium->getParent();
/* make the relock atomic */
AutoWriteLock parentLock (parent);
rc = parent->UnlockWrite(NULL);
rc = parent->LockRead(NULL);


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20150130/aed16937/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MachineImpl.diff
Type: text/x-patch
Size: 998 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20150130/aed16937/attachment.bin 

More information about the vbox-dev mailing list