The following commit has been merged in the master branch:
commit c14536545d99ec6ce3d6b30bb7b3b8eb4667ac2d
Author: Mark Vitale <[email protected]>
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 <[email protected]>
    Reviewed-by: Michael Meffie <[email protected]>
    Reviewed-by: Cheyenne Wills <[email protected]>
    Reviewed-by: Mark Vitale <[email protected]>
    Reviewed-by: Andrew Deason <[email protected]>

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

-- 
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs

Reply via email to