<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello!<br>
<br>
We would like to contribute to VirtualBox under MIT license. We send
our changes to fix bug described at
<a class="moz-txt-link-freetext" href="https://www.virtualbox.org/ticket/13801">https://www.virtualbox.org/ticket/13801</a> .<br>
<br>
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 <i>pMediumLockList</i> is changed, not
<i>Medium</i> object. May be parent write-locking code left after
old version, where parent lock type updating looked like this
(version <i>3.1.8</i>):<br>
<br>
<font face="monospace">ComObjPtr<Medium> parent =
pMedium->getParent();<br>
/* make the relock atomic */<br>
AutoWriteLock parentLock (parent);<br>
rc = parent->UnlockWrite(NULL);<br>
AssertComRC(rc);<br>
rc = parent->LockRead(NULL);<br>
AssertComRC(rc);</font><br>
<br>
Regards,<br>
Alexander<br>
<br>
</body>
</html>