[Pkg-virtualbox-commits] r186 - in trunk/debian: . patches

meskes at alioth.debian.org meskes at alioth.debian.org
Thu Jan 10 14:15:47 UTC 2008


Author: meskes
Date: 2008-01-10 14:15:47 +0000 (Thu, 10 Jan 2008)
New Revision: 186

Added:
   trunk/debian/patches/10-diff-vmreq.dpatch
Modified:
   trunk/debian/changelog
Log:
* Added patch from SVN send by Frank Mehnert <frank at innotek.de> to fix runtime assertions.



Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-01-08 13:06:35 UTC (rev 185)
+++ trunk/debian/changelog	2008-01-10 14:15:47 UTC (rev 186)
@@ -1,3 +1,10 @@
+virtualbox-ose (1.5.4-dfsg-3) unstable; urgency=low
+
+  * Added patch from SVN send by Frank Mehnert <frank at innotek.de> to fix
+    runtime assertions.
+
+ -- Michael Meskes <meskes at debian.org>  Thu, 10 Jan 2008 15:14:26 +0100
+
 virtualbox-ose (1.5.4-dfsg-2) unstable; urgency=low
 
   [ Hilko Bengen ]

Added: trunk/debian/patches/10-diff-vmreq.dpatch
===================================================================
--- trunk/debian/patches/10-diff-vmreq.dpatch	                        (rev 0)
+++ trunk/debian/patches/10-diff-vmreq.dpatch	2008-01-10 14:15:47 UTC (rev 186)
@@ -0,0 +1,67 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10-diff-vmreq.dpatch by Michael Meskes <meskes at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix runtime assertions
+
+ at DPATCH@
+
+Index: virtualbox-1.5.4/srcVBox/VMM/VMReq.cpp
+===================================================================
+--- virtualbox-1.5.4/srcVBox/VMM/VMReq.cpp	(revision 27120)
++++ virtualbox-1.5.4/srcVBox/VMM/VMReq.cpp	(revision 27121)
+@@ -525,9 +525,16 @@
+         return VERR_VM_REQUEST_INVALID_TYPE;
+     }
+ 
++    /*
++     * Are we the EMT or not?
++     * Also, store pVM (and fFlags) locally since pReq may be invalid after queuing it.
++     */
+     int rc = VINF_SUCCESS;
+-    if (pReq->pVM->NativeThreadEMT != RTThreadNativeSelf())
++    PVM pVM = ((VMREQ volatile *)pReq)->pVM;                    /* volatile paranoia */
++    if (pVM->NativeThreadEMT != RTThreadNativeSelf())
+     {
++        unsigned fFlags = ((VMREQ volatile *)pReq)->fFlags;     /* volatile paranoia */
++
+         /*
+          * Insert it.
+          */
+@@ -535,20 +542,20 @@
+         PVMREQ pNext;
+         do
+         {
+-            pNext = pReq->pVM->vm.s.pReqs;
++            pNext = pVM->vm.s.pReqs;
+             pReq->pNext = pNext;
+-        } while (!ASMAtomicCmpXchgPtr((void * volatile *)&pReq->pVM->vm.s.pReqs, (void *)pReq, (void *)pNext));
++        } while (!ASMAtomicCmpXchgPtr((void * volatile *)&pVM->vm.s.pReqs, (void *)pReq, (void *)pNext));
+ 
+         /*
+          * Notify EMT.
+          */
+-        VM_FF_SET(pReq->pVM, VM_FF_REQUEST);
+-        VMR3NotifyFF(pReq->pVM, false);
++        VM_FF_SET(pVM, VM_FF_REQUEST);
++        VMR3NotifyFF(pVM, false);
+ 
+         /*
+          * Wait and return.
+          */
+-        if (!(pReq->fFlags & VMREQFLAGS_NO_WAIT))
++        if (!(fFlags & VMREQFLAGS_NO_WAIT))
+             rc = VMR3ReqWait(pReq, cMillies);
+         LogFlow(("VMR3ReqQueue: returns %Vrc
+", rc));
+     }
+@@ -558,7 +565,7 @@
+          * The requester was EMT, just execute it.
+          */
+         pReq->enmState = VMREQSTATE_QUEUED;
+-        rc = vmR3ReqProcessOne(pReq->pVM, pReq);
++        rc = vmR3ReqProcessOne(pVM, pReq);
+         LogFlow(("VMR3ReqQueue: returns %Vrc (processed)
+", rc));
+     }
+     return rc;




More information about the Pkg-virtualbox-commits mailing list