OpenAFS CVS Commit: openafs/src/afs/LINUX by shadow

cvs@GRAND.CENTRAL.ORG cvs@GRAND.CENTRAL.ORG
Wed, 18 Apr 2007 14:04:11 EDT


Update of /cvs/openafs/src/afs/LINUX
In directory GRAND.CENTRAL.ORG:/data/sb/openafs-stable-1_4_x/src/afs/LINUX

Modified Files:
      Tag: openafs-stable-1_4_x
	osi_alloc.c 
Log Message:
DELTA STABLE14-vmalloc-no-glock-20070418
AUTHOR cg2v@andrew.cmu.edu

Based on Chris Wing's analysis which stated in part:
GFP_NOFS tells the allocator not to recurse back into the filesystem if it's
necessary to free up memory.  However, vmalloc() does not have such an
option.  Therefore, calling osi_Alloc() to request more than a page of
memory may end up recursing back into AFS to try to free unused inodes or
dentries.

In this case, what happened was that osi_Alloc() is called within an
AFS_GLOCK(); osi_Alloc() calls vmalloc() which tries to free dentry objects,
which then calls back into the AFS module.  Unfortunately, AFS_GLOCK() is
already held and we deadlock.


--- DELTA config for openafs-stable-1_4_x follows ---
STABLE14-vmalloc-no-glock-20070418 openafs/src/afs/LINUX/osi_alloc.c 1.22.2.1 1.22.2.2