• Nils Goroll's avatar
    ban lurker should back off on seeing a busy object · 128fbe7c
    Nils Goroll authored
    HSH_Unbusy() calls BAN_NewObjCore() not holding the objhead
    lock, so the ban lurker may race and grab the ban mtx just
    after the new oc has been inserted, but the busy flag not
    yet cleared.
    
    While it would be correct to call BAN_NewObjCore() with the
    objhead mtx held, doing so would increase the pressure on the
    combined ban & objhead mtx.
    
    If the ban lurker encounters a busy object, we know that there
    must be an unbusy in progress and it would be wiser to rather
    back off in favor of the it.
    
    Fixes #2681
    128fbe7c
cache_ban_lurker.c 10.7 KB