OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_66-11-gb21b209

Gerrit Code Review gerrit@openafs.org
Mon, 26 Oct 2009 15:01:49 -0700 (PDT)


The following commit has been merged in the master branch:
commit b21b209f1cb2bafe916543c1ac8f232d6fc84847
Author: Simon Wilkinson <sxw@inf.ed.ac.uk>
Date:   Mon Oct 26 17:06:20 2009 +0000

    Fix locking in afs_buffer.c
    
    Back in 2002, 0eb68f307aac84472a13523a0ce8b7a865f01ac7 was committed
    to fix locking problems in dir/buffer.c.
    
    Sadly, similar changes were never made to afs/afs_buffer.c, so the
    same problems remain in the cache manager.
    
    The issue here is with two processes racing in afs_newslot. Calls to
    afs_newslot protect buffers with a zero reference count using
    afs_bufferLock. If we release afs_bufferLock, before we increase the
    reference count of the vcache, then we can end up with newslot
    picking the same buffer for two different purposes.
    
    The GLOCK actually protects us from the worst of this, but this fix
    is necessary both for correctness, and for symmetry with the file
    server buffer code.
    
    Change-Id: I7f1c7d6571559c5f1784926c39d4889b77677231
    Reviewed-on: http://gerrit.openafs.org/737
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    Tested-by: Derrick Brashear <shadow@dementia.org>

 src/afs/afs_buffer.c |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

-- 
OpenAFS Master Repository