From: Andrew Deason Date: Sun, 16 May 2010 04:12:33 +0000 (-0500) Subject: Solaris: do not call VFS_RELE with GLOCK X-Git-Tag: openafs-devel-1_5_75~282 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c0afd1419de3fb8cab44ac212d0a85a9998c7cba;p=packages%2Fo%2Fopenafs.git Solaris: do not call VFS_RELE with GLOCK VFS_RELE can call afs_freevfs, which grabs GLOCK. Thus, don't call VFS_RELE with GLOCK held or we can try to recursively acquire GLOCK and panic. This is currently unlikely to occur (sans vfs refcount unbalances) without support for forced unmounts, since the last vfs ref will usually come from the caller of afs_unmount(). But it still may be possible. Change-Id: I152bd13abc2e90f258f98194833c50c3a2846904 Reviewed-on: http://gerrit.openafs.org/1966 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear --- diff --git a/src/afs/SOLARIS/osi_vnodeops.c b/src/afs/SOLARIS/osi_vnodeops.c index 0ec2e09b0..4c88297b8 100644 --- a/src/afs/SOLARIS/osi_vnodeops.c +++ b/src/afs/SOLARIS/osi_vnodeops.c @@ -1817,7 +1817,11 @@ afs_inactive(struct vcache *avc, afs_ucred_t *acred) afs_InactiveVCache(avc, acred); #ifdef AFS_SUN58_ENV + AFS_GUNLOCK(); + /* VFS_RELE must be called outside of GLOCK, since it can potentially + * call afs_freevfs, which acquires GLOCK */ VFS_RELE(afs_globalVFS); + AFS_GLOCK(); #endif return 0;