OpenAFS Master Repository branch, openafs-devel-1_7_x, updated. openafs-devel-1_7_14-1-g8f18ee0

Gerrit Code Review gerrit@openafs.org
Fri, 1 Jun 2012 17:26:13 -0700 (PDT)


The following commit has been merged in the openafs-devel-1_7_x branch:
commit 8f18ee0c1eed4bd3aa83bfae419e93fbca6ab62d
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
    
    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>
    (cherry picked from commit 06a602bfd40661ef89b3d6b39dd8574015a15b92)
    
    Change-Id: I817dc51ae57adb145cbd9078c86f9df12b31fd28
    Reviewed-on: http://gerrit.openafs.org/7507
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-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