xserver lock order violation
authorDerrick Brashear <shadow@dementix.org>
Tue, 23 Aug 2011 04:20:37 +0000 (00:20 -0400)
committerDerrick Brashear <shadow@dementix.org>
Wed, 31 Aug 2011 18:37:54 +0000 (11:37 -0700)
commit16dff61e148ce6893a68dda6e05e84f96fa753ac
tree966d8b07cf035ab89aa8c9417b67be4a48650eef
parent12fa5b859b857aaf0ab6975ebac0d4867d0ae0ff
xserver lock order violation

individual volume locks are pretty far down, well after afs_xserver.

afs_SetupVolume (with tv->lock)-> InstallUVolumeEntry-> afs_GetServer.

Install*Volume is careful to protect against recursing into the volume
lock via ResetVolumeInfo. Unfortunately, GetServer acquires xserver,
and then if it needs to call GetCapabilities, it drops and reacquires
xserver.

turns out the volume locks weren't protecting much. they also aren't
grabbed before xvolume is dropped. fine, so, restructure to do all the
work, then merge the result.

Change-Id: I648900849a5a7349adc686658872706bd7024c90
Reviewed-on: http://gerrit.openafs.org/5303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/afs/DOC/afs_rwlocks
src/afs/afs_analyze.c
src/afs/afs_cell.c
src/afs/afs_pioctl.c
src/afs/afs_prototypes.h
src/afs/afs_server.c
src/afs/afs_volume.c