OpenAFS Master Repository branch, master, updated. BP--openafs-stable-1_6_x-1174-g330cc7c

Gerrit Code Review gerrit@openafs.org
Sun, 15 May 2011 06:01:18 -0700 (PDT)


The following commit has been merged in the master branch:
commit ae638fa383b8270fe2461a2ad91b9101c74f3593
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Tue May 10 12:54:53 2011 -0500

    libafs: Do not write-lock afs_xserver on ICBS
    
    Our RXAFSCB_InitCallBackState* handler currently write-locks
    afs_xserver when it clears the SCAPS_KNOWN flag for the relevant
    server. However, the afs_xserver lock is for protecting the global
    list and hash table of server structures, and is not necessary to
    acquire in order to modify the flags of an individual server struct.
    For instance, CkSrv_GetCaps does not acquire any locks to modify the
    server flags.
    
    Taking this lock conflicts with a read lock on afs_xserver acquired by
    afs_FlushVCBs when it traverses the list of server structures.
    afs_FlushVCBs may contact a server that then calls InitCallBackState
    on us, causing a deadlock if ICBS waits for the afs_xserver lock.
    
    So, avoid locking afs_xserver in this case, to avoid that deadlock.
    
    Change-Id: Id4dea74ce85726a3da07f738e301600f46059297
    Reviewed-on: http://gerrit.openafs.org/4639
    Tested-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Derrick Brashear <shadow@dementia.org>

 src/afs/afs_callback.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

-- 
OpenAFS Master Repository