summaryrefslogtreecommitdiff
path: root/src/VBox/HostDrivers/Support/os2
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/HostDrivers/Support/os2
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/HostDrivers/Support/os2')
-rw-r--r--src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp23
-rw-r--r--src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def2
-rw-r--r--src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp5
-rw-r--r--src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c2
4 files changed, 21 insertions, 11 deletions
diff --git a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
index b3927eb0..0eecf131 100644
--- a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
+++ b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
@@ -150,7 +150,7 @@ DECLASM(int) VBoxDrvOpen(uint16_t sfn)
/*
* Create a new session.
*/
- rc = supdrvCreateSession(&g_DevExt, true /* fUser */, &pSession);
+ rc = supdrvCreateSession(&g_DevExt, true /* fUser */, true /*fUnrestricted*/, &pSession);
if (RT_SUCCESS(rc))
{
pSession->sfn = sfn;
@@ -221,7 +221,7 @@ DECLASM(int) VBoxDrvClose(uint16_t sfn)
/*
* Close the session.
*/
- supdrvCloseSession(&g_DevExt, pSession);
+ supdrvSessionRelease(pSession);
return 0;
}
@@ -243,6 +243,9 @@ DECLASM(int) VBoxDrvIOCtlFast(uint16_t sfn, uint8_t iFunction)
while ( pSession
&& ( pSession->sfn != sfn
|| pSession->Process != Process));
+
+ if (RT_LIKELY(pSession))
+ supdrvSessionRetain(pSession);
}
RTSpinlockReleaseNoInts(g_Spinlock);
if (RT_UNLIKELY(!pSession))
@@ -255,6 +258,7 @@ DECLASM(int) VBoxDrvIOCtlFast(uint16_t sfn, uint8_t iFunction)
* Dispatch the fast IOCtl.
*/
supdrvIOCtlFast(iFunction, 0, &g_DevExt, pSession);
+ supdrvSessionRelease(pSession);
return 0;
}
@@ -276,6 +280,9 @@ DECLASM(int) VBoxDrvIOCtl(uint16_t sfn, uint8_t iCat, uint8_t iFunction, void *p
while ( pSession
&& ( pSession->sfn != sfn
|| pSession->Process != Process));
+
+ if (RT_LIKELY(pSession))
+ supdrvSessionRetain(pSession);
}
RTSpinlockReleaseNoInts(g_Spinlock);
if (!pSession)
@@ -345,12 +352,14 @@ DECLASM(int) VBoxDrvIOCtl(uint16_t sfn, uint8_t iCat, uint8_t iFunction, void *p
* Unlock and return.
*/
int rc2 = KernVMUnlock(&Lock);
- AssertMsg(!rc2, ("rc2=%d\n", rc2)); NOREF(rc2);
-
- Log2(("VBoxDrvIOCtl: returns %d\n", rc));
- return rc;
+ AssertMsg(!rc2, ("rc2=%d\n", rc2)); NOREF(rc2);s
}
- return VERR_NOT_SUPPORTED;
+ else
+ rc = VERR_NOT_SUPPORTED;
+
+ supdrvSessionRelease(pSession);
+ Log2(("VBoxDrvIOCtl: returns %d\n", rc));
+ return rc;
}
diff --git a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def
index 420bfd61..18550ae1 100644
--- a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def
+++ b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.def
@@ -4,7 +4,7 @@
;
;
-; Copyright (C) 2007 Oracle Corporation
+; Copyright (C) 2007-2010 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp b/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp
index c502b7c4..0f235eeb 100644
--- a/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp
+++ b/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -65,7 +65,7 @@
-int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited)
+int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited, bool fUnrestricted)
{
/*
* Nothing to do if pre-inited.
@@ -100,6 +100,7 @@ int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited)
}
pThis->hDevice = hDevice;
+ pThis->fUnrestricted = true;
return VINF_SUCCESS;
}
diff --git a/src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c b/src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c
index a20af460..9f06939d 100644
--- a/src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c
+++ b/src/VBox/HostDrivers/Support/os2/SUPR0IdcClient-os2.c
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2008 Oracle Corporation
+ * Copyright (C) 2008-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;