VirtualBox

Ignore:
Timestamp:
Jul 17, 2008 12:06:56 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33448
Message:

Fixed issue in fast (METHOD_NEITHER) ioctls.
Write the last error to pVM->vmm.s.iLastGCRc instead of writing it to a user buffer.

Location:
trunk/src/VBox/HostDrivers/Support/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r10662 r10720  
    296296        int   rc;
    297297
     298        /* We're here with METHOD_NEITHER, which means no parameter validation has been performed. Do not use input
     299         * or write to output parameters!
     300         */
     301
    298302        /* Raise the IRQL to DISPATCH_LEVEl to prevent Windows from rescheduling us to another CPU/core. */
    299303        Assert(KeGetCurrentIrql() <= DISPATCH_LEVEL);
     
    304308        /* Complete the I/O request. */
    305309        NTSTATUS rcNt = pIrp->IoStatus.Status = STATUS_SUCCESS;
    306         pIrp->IoStatus.Information = sizeof(rc);
    307         __try
    308         {
    309             *(int *)pIrp->UserBuffer = rc;
    310         }
    311         __except(EXCEPTION_EXECUTE_HANDLER)
    312         {
    313             rcNt = pIrp->IoStatus.Status = GetExceptionCode();
    314             dprintf(("VBoxSupDrvDeviceContorl: Exception Code %#x\n", rcNt));
    315         }
    316310        IoCompleteRequest(pIrp, IO_NO_INCREMENT);
    317311        return rcNt;
  • trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp

    r10256 r10720  
    645645     */
    646646    int rc = VERR_INTERNAL_ERROR;
    647     DWORD cbReturned = (ULONG)sizeof(rc);
    648     if (DeviceIoControl(g_hDevice, uFunction, NULL, 0, &rc, (DWORD)sizeof(rc), &cbReturned, NULL))
     647    if (DeviceIoControl(g_hDevice, uFunction, NULL, 0, NULL, 0, NULL, NULL))
    649648        return rc;
    650649    return suplibConvertWin32Err(GetLastError());
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette