VirtualBox

Changeset 5054 in vbox


Ignore:
Timestamp:
Sep 26, 2007 3:54:23 PM (17 years ago)
Author:
vboxsync
Message:

PGMPhysIsPageMappingLockValid won't work on uninitialized data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/CPUM.cpp

    r5053 r5054  
    15161516    /** The lock information that PGMPhysReleasePageMappingLock needs. */
    15171517    PGMPAGEMAPLOCK  PageMapLock;
     1518    /** Whether the PageMapLock is valid or not. */
     1519    bool            fLocked;
    15181520} CPUMDISASSTATE, *PCPUMDISASSTATE;
    15191521
     
    15561558            {
    15571559                /* Release mapping lock previously acquired. */
    1558                 if (PGMPhysIsPageMappingLockValid(pState->pVM, &pState->PageMapLock))
     1560                if (pState->fLocked)
    15591561                    PGMPhysReleasePageMappingLock(pState->pVM, &pState->PageMapLock);
    1560 
    15611562                rc = PGMPhysGCPtr2CCPtrReadOnly(pState->pVM, pState->pvPageGC, &pState->pvPageHC, &pState->PageMapLock);
     1563                pState->fLocked = RT_SUCCESS_NP(rc);
    15621564            }
    15631565            if (VBOX_FAILURE(rc))
     
    16111613    State.pvPageHC        = NULL;
    16121614    State.pVM             = pVM;
     1615    State.fLocked         = false;
    16131616
    16141617    /*
     
    16881691
    16891692    /* Release mapping lock acquired in cpumR3DisasInstrRead. */
    1690     if (PGMPhysIsPageMappingLockValid(pVM, &State.PageMapLock))
     1693    if (State.fLocked)
    16911694        PGMPhysReleasePageMappingLock(pVM, &State.PageMapLock);
    16921695
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