OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-551-gc145365

Gerrit Code Review gerrit@openafs.org
Fri, 18 Oct 2024 11:28:31 -0400


The following commit has been merged in the master branch:
commit c14536545d99ec6ce3d6b30bb7b3b8eb4667ac2d
Author: Mark Vitale <mvitale@sinenomine.net>
Date:   Mon Aug 31 15:08:40 2020 -0400

    volser: Lock entry properly in UV_RestoreVolume2
    
    Since the original IBM code import, UV_RestoreVolume (later renamed to
    to the current name UV_RestoreVolume2) has called VLDB_GetEntryByID to
    obtain the VLDB entry of the target/destination volume.  This entry is
    then modified to match the restore changes, locked via VL_SetLock, and
    replaced via VL_ReplaceEntryN.
    
    Unfortunately, this allows for a race with other volume operations
    against the same volume, if another operation alters the entry after we
    call VLDB_GetEntryByID but before ubik_VL_SetLock. To avoid this, call
    GetLockedEntry to ensure that the entry is locked while we are reading
    and modifying it.
    
    Change-Id: I772ef80158205f45c04f8ef0aa95726f1f2c4ac4
    Reviewed-on: https://gerrit.openafs.org/14354
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/volser/vsprocs.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

-- 
OpenAFS Master Repository