Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 25842)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 25843)
@@ -96,5 +96,5 @@
 
 Machine::Data::Data()
-    : mSnapshotsTreeLockHandle(LOCKCLASS_OTHERLIST)
+    : mSnapshotsTreeLockHandle(LOCKCLASS_MACHINELIST)
 {
     mRegistered = FALSE;
@@ -631,11 +631,5 @@
     LogFlowThisFunc(("mRegistered=%d\n", mData->mRegistered));
 
-    /* Enter this object lock because there may be a SessionMachine instance
-     * somewhere around, that shares our data and lock but doesn't use our
-     * addCaller()/removeCaller(), and it may be also accessing the same data
-     * members. mParent lock is necessary as well because of
-     * SessionMachine::uninit(), etc.
-     */
-    AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     if (!mData->mSession.mMachine.isNull())
@@ -653,14 +647,12 @@
          * still valid). We'll call it ourselves below.
          */
-        LogWarningThisFunc(("Session machine is not NULL (%p), "
-                             "the direct session is still open!\n",
-                             (SessionMachine *) mData->mSession.mMachine));
-
-        if (Global::IsOnlineOrTransient (mData->mMachineState))
+        LogWarningThisFunc(("Session machine is not NULL (%p), the direct session is still open!\n",
+                            (SessionMachine*)mData->mSession.mMachine));
+
+        if (Global::IsOnlineOrTransient(mData->mMachineState))
         {
             LogWarningThisFunc(("Setting state to Aborted!\n"));
             /* set machine state using SessionMachine reimplementation */
-            static_cast <Machine *> (mData->mSession.mMachine)
-                ->setMachineState (MachineState_Aborted);
+            static_cast<Machine*>(mData->mSession.mMachine)->setMachineState (MachineState_Aborted);
         }
 
@@ -671,5 +663,5 @@
         mData->mSession.mMachine->uninit();
         /* SessionMachine::uninit() must set mSession.mMachine to null */
-        Assert (mData->mSession.mMachine.isNull());
+        Assert(mData->mSession.mMachine.isNull());
     }
 
@@ -9741,5 +9733,5 @@
  *  filter for the given USB device and @c false otherwise.
  *
- *  @note Locks this object for reading.
+ *  @note Caller must have requested machine read lock.
  */
 bool SessionMachine::hasMatchingUSBFilter (const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs)
@@ -9751,5 +9743,5 @@
         return false;
 
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    AssertReturn(isWriteLockOnCurrentThread(), false);
 
 #ifdef VBOX_WITH_USB
Index: /trunk/src/VBox/Main/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MediumImpl.cpp	(revision 25842)
+++ /trunk/src/VBox/Main/MediumImpl.cpp	(revision 25843)
@@ -1256,5 +1256,5 @@
  *       uninit() methods.
  *
- * @note Locks getTreeLock() for writing, VirtualBox for writing.
+ * @note Caller must hold the tree lock of the medium tree this medium is on.
  */
 void Medium::uninit()
@@ -1281,9 +1281,4 @@
     else
     {
-        /* we uninit children and reset mParent
-         * and VirtualBox::removeDependentChild() needs a write lock */
-        AutoWriteLock alock1(m->pVirtualBox->lockHandle() COMMA_LOCKVAL_SRC_POS);
-        AutoWriteLock alock2(m->pVirtualBox->hardDiskTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
-
         MediaList::iterator it;
         for (it = m->llChildren.begin();
@@ -3055,8 +3050,8 @@
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
     /* we access mParent */
     AutoReadLock treeLock(m->pVirtualBox->hardDiskTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     data.uuid = m->id;
Index: /trunk/src/VBox/Main/NetworkAdapterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/NetworkAdapterImpl.cpp	(revision 25842)
+++ /trunk/src/VBox/Main/NetworkAdapterImpl.cpp	(revision 25843)
@@ -906,6 +906,4 @@
     AutoCaller autoCaller(this);
     AssertComRCReturnRC(autoCaller.rc());
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* Note: we assume that the default values for attributes of optional
