Changeset 16722 in vbox for trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
- Timestamp:
- Feb 13, 2009 12:37:20 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
r14824 r16722 114 114 { 115 115 struct as *addrSpace; 116 if ( pMemSolaris->Core.u.Lock.R0Process != NIL_RTR0PROCESS)116 if ((uintptr_t)pMemSolaris->Core.pv < kernelbase) 117 117 { 118 118 addrSpace = ((proc_t *)pMemSolaris->Core.u.Lock.R0Process)->p_as; … … 272 272 273 273 /* 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); 288 278 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); 290 289 rtR0MemObjDelete(&pMemSolaris->Core); 291 290 return VERR_LOCK_FAILED;
Note:
See TracChangeset
for help on using the changeset viewer.