VirtualBox

Ignore:
Timestamp:
Feb 13, 2009 12:37:20 AM (16 years ago)
Author:
vboxsync
Message:

runtime fix for solaris shared folders

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c

    r14824 r16722  
    114114        {
    115115            struct as *addrSpace;
    116             if (pMemSolaris->Core.u.Lock.R0Process != NIL_RTR0PROCESS)
     116            if ((uintptr_t)pMemSolaris->Core.pv < kernelbase)
    117117            {
    118118                addrSpace = ((proc_t *)pMemSolaris->Core.u.Lock.R0Process)->p_as;
     
    272272
    273273    /* Lock down user pages */
    274     int rc = as_pagelock(useras, &ppl, (caddr_t)R3Ptr, cb, S_WRITE);
    275     if (!rc)
    276     {
    277         if (ppl)
    278         {
    279             pMemSolaris->Core.u.Lock.R0Process = (RTR0PROCESS)userproc;
    280             pMemSolaris->ppShadowPages = ppl;
    281             *ppMem = &pMemSolaris->Core;
    282             return VINF_SUCCESS;
    283         }
    284 
    285         as_pageunlock(useras, ppl, (caddr_t)R3Ptr, cb, S_WRITE);
    286         cmn_err(CE_NOTE, "rtR0MemObjNativeLockUser: as_pagelock failed to get shadow pages\n");
    287     }
     274    int rc;
     275    ppl = NULL;
     276    if ((uintptr_t)R3Ptr < kernelbase)
     277        rc = as_pagelock(useras, &ppl, (caddr_t)R3Ptr, cb, S_WRITE);
    288278    else
    289         cmn_err(CE_NOTE,"rtR0MemObjNativeLockUser: as_pagelock failed rc=%d\n", rc);
     279        rc = 0;
     280    if (rc == 0)
     281    {
     282        pMemSolaris->Core.u.Lock.R0Process = (RTR0PROCESS)userproc;
     283        pMemSolaris->ppShadowPages = ppl;
     284        *ppMem = &pMemSolaris->Core;
     285        return VINF_SUCCESS;
     286    }
     287
     288    cmn_err(CE_NOTE,"rtR0MemObjNativeLockUser: as_pagelock failed rc=%d\n", rc);
    290289    rtR0MemObjDelete(&pMemSolaris->Core);
    291290    return VERR_LOCK_FAILED;
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