]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Windows: avoid race when writing mountPointString
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 19 Apr 2011 04:12:49 +0000 (00:12 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Fri, 22 Apr 2011 22:34:36 +0000 (15:34 -0700)
commit314bc2e0082edea04ffb6908e2479be904b21b8e
tree5b96413e116819305f8988c5612825c04a8ec52f
parent2d6f45161c65f3eaf2ca7f05ebbeb335e2e72fad
Windows: avoid race when writing mountPointString

cm_GetData() drops the cm_scache_t rw lock which permits other
threads to access the data while it is in an inconsistent state.
Avoid the race by using a stack allocated temporary buffer to
receive the data from cm_GetData().  Only copy the data into
the mountPointStringp buffer under the rwlock.

Change-Id: Id5ab3c5ed7c76551d53fedea96eeded59c2c699d
Reviewed-on: http://gerrit.openafs.org/4498
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/4522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/WINNT/afsd/cm_vnodeops.c