OpenAFS Master Repository branch, openafs-stable-1_4_x, updated. openafs-stable-1_4_12-4-g94a4396

Gerrit Code Review gerrit@openafs.org
Wed, 17 Mar 2010 11:23:49 -0700 (PDT)


The following commit has been merged in the openafs-stable-1_4_x branch:
commit 94a439668b8ef90027f922e9fb85fe1f3e983100
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Mon Feb 15 10:55:33 2010 -0600

    h_TossStuff_r: check held-ness after lock
    
    h_TossStuff_r checks if a host is held or locked by another thread
    before trying to delete the host. Unfortunately, it checks if it is
    locked before checking if it is held, and the lock check drops H_LOCK.
    Thus, another thread could hold the host while we don't have H_LOCK, and
    we could delete a host that is being held.
    
    Although it is a bug if any thread holds a host that is being deleted,
    some instances of this still exist, so make the check more robust.
    Reverse the order of the tests, so we detect if someone held the host
    while the lock check dropped H_LOCK.
    
    Also log when this happens, as it indicates a bug occurring.
    
    FIXES 126454
    
    Reviewed-on: http://gerrit.openafs.org/1312
    Tested-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    Tested-by: Derrick Brashear <shadow@dementia.org>
    (cherry picked from commit 45aceee9842265fb0ccdb5e8f3f6d32c8d2b99ea)
    
    Change-Id: Ibce716b0d57d02d1ad912276dfa9f4b169294947
    Reviewed-on: http://gerrit.openafs.org/1367
    Tested-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    Tested-by: Derrick Brashear <shadow@dementia.org>

 src/viced/host.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

-- 
OpenAFS Master Repository