OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-2567-g06a602b

Gerrit Code Review gerrit@openafs.org
Thu, 31 May 2012 16:36:30 -0700 (PDT)


The following commit has been merged in the master branch:
commit 06a602bfd40661ef89b3d6b39dd8574015a15b92
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date:   Thu May 24 04:57:19 2012 -0400

    Windows: Avoid deadlock on VolumeCB->VolumeLock
    
    AFSPrimaryVolumeWorkerThread() holds VolumeCB->VolumeLock SHARED
    across the call to AFSCleanupFcb() -> CcPurgeCacheSection().
    If a filter driver such as Sophos (savonaccessfilter.sys ->
    savonaccesscontrol.sys) triggers an AFSCreate() in response to
    the cache section being purged that will force the evaluation of
    the file path by AFSLocateNameEntry().  If the path contains a
    mount point that requires validation, AFSBuildMountPointTarget()
    is called which in turn required the VolumeCB->VolumeLock EXCL.
    
    AFSBuildMountPointTarget() only requires the VolumeCB->VolumeLock
    if the VolumeCB->RootFcb == NULL.  That should only be true if
    the VolumeCB was allocated by AFSInitVolume() or under very rare
    race conditions.
    
    This patchset refactors AFSInitVolume() to ensure that it holds
    an extra VolumeCB->VolumeReferenceCount reference.  This reference
    is used to assist in the refactoring of AFSBuildRootVolume() and
    AFSBuildMountPointTarget() to avoid races with volume root object
    invalidation as well as permitting the VolumeCB->VolumeLock to
    be ignored in the common case.
    
    Avoiding the acquisition of VolumeCB->VolumeLock during mount
    point target evaluation has the additional benefit of reducing
    lock contention during path evaluation.
    
    FIXES 130812
    
    Change-Id: Id9b0dcc2bfd91277d522f3724893b60ce4d947f5
    Reviewed-on: http://gerrit.openafs.org/7474
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
    Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
    Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

 src/WINNT/afsrdr/kernel/lib/AFSFcbSupport.cpp  |    6 +-
 src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp     |    5 +
 src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp |  112 ++++++++++++++----------
 3 files changed, 74 insertions(+), 49 deletions(-)

-- 
OpenAFS Master Repository