VirtualBox

Changeset 90437 in vbox for trunk


Ignore:
Timestamp:
Jul 30, 2021 4:18:25 PM (4 years ago)
Author:
vboxsync
Message:

VMM: More PDMCritSectEnter return code checks. bugref:6695

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PDMAllNetShaper.cpp

    r90384 r90437  
    4545    PPDMNSBWGROUP pBwGroup = ASMAtomicReadPtrT(&pFilter->CTX_SUFF(pBwGroup), PPDMNSBWGROUP);
    4646    int rc = PDMCritSectEnter(pVM, &pBwGroup->Lock, VERR_SEM_BUSY); AssertRC(rc);
    47     if (RT_UNLIKELY(rc == VERR_SEM_BUSY))
    48         return true;
     47    if (RT_SUCCESS(rc))
     48    { /* likely */ }
     49    else
     50    {
     51        if (rc == VERR_SEM_BUSY)
     52            return true;
     53        PDM_CRITSECT_RELEASE_ASSERT_RC(pVM, &pBwGroup->Lock, rc);
     54        return false;
     55    }
    4956
    5057    bool fAllowed = true;
  • trunk/src/VBox/VMM/VMMR3/PDMCritSect.cpp

    r90420 r90437  
    870870    int rc = PDMCritSectEnter(pVM, pCritSect, VERR_IGNORED);
    871871#endif
    872     AssertLogRelRC(rc);
     872    PDM_CRITSECT_RELEASE_ASSERT_RC(pVM, pCritSect, rc);
    873873    return true;
    874874}
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