OpenAFS Master Repository branch, openafs-stable-1_4_x, updated. b21d0930e56a3331cd94c30a07e9d8fdebdcd5c4
Gerrit Code Review
gerrit@openafs.org
Wed, 16 Dec 2009 23:00:47 -0800 (PST)
The following commit has been merged in the openafs-stable-1_4_x branch:
commit 7cb287abe44df635ecedaf722b86d03425d3845a
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>
(cherry picked from commit b21b209f1cb2bafe916543c1ac8f232d6fc84847)
Reviewed-on: http://gerrit.openafs.org/980
src/afs/afs_buffer.c | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
--
OpenAFS Master Repository