VirtualBox

Ignore:
Timestamp:
Aug 31, 2007 7:23:49 PM (17 years ago)
Author:
vboxsync
Message:

Solaris.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c

    r4287 r4474  
    513513    PSUPDRVIOCTLDATA    pArgData = (PSUPDRVIOCTLDATA)pArgs;
    514514
    515     cmn_err(CE_CONT, "VBoxDrvSolarisIOCtlSlow\n");
    516515   /*
    517516     * Allocate and copy user space input data buffer to kernel space.
     
    528527        }
    529528       
    530         rc = ddi_copyin(pArgData->pvIn, pvBuf, cbBuf, Mode);
     529        rc = ddi_copyin(pArgData->pvIn, pvBuf, pArgData->cbIn, Mode);
    531530       
    532531        if (rc != 0)
    533532        {
    534             OSDBGPRINT(("VBoxDrvSolarisIOCtlSlow: ddi_copyin(%p,%d) failed.\n", pArgData->pvIn, cbBuf));
     533            OSDBGPRINT(("VBoxDrvSolarisIOCtlSlow: ddi_copyin(%p,%d) failed.\n", pArgData->pvIn, pArgData->cbIn));
    535534
    536535            RTMemTmpFree(pvBuf);
     
    555554            rc = ddi_copyout(pvBuf, pArgData->pvOut, cbOut, Mode);
    556555            if (rc != 0)
     556            {
    557557                OSDBGPRINT(("VBoxDrvSolarisIOCtlSlow: ddi_copyout(,%p,%d) failed.\n", pArgData->pvOut, cbBuf));
     558
     559                /** @todo r=bird: why this extra return? setting rc = EFAULT; should do the trick, shouldn't it? */
     560                RTMemTmpFree(pvBuf);
     561                return EFAULT;
     562            }
    558563        }
    559564        else
     
    564569    }
    565570
     571    if (pvBuf)
     572        RTMemTmpFree(pvBuf);
     573   
    566574    OSDBGPRINT(("VBoxDrvSolarisIOCtlSlow: returns %d cbOut=%d\n", rc, cbOut));
    567575    return rc;
Note: See TracChangeset for help on using the changeset viewer.

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