]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DEVEL15-vmalloc-no-glock-20070418
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Wed, 18 Apr 2007 19:02:47 +0000 (19:02 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 18 Apr 2007 19:02:47 +0000 (19:02 +0000)
commit9adb2ba31349ca5ff3899a8b7c9e4144acfa9bac
treeaf8bfd67e5970141956ee6388c5965adac7cc5b4
parent497dfd96e7de359595d5a815bbbd7bbed942d686
DEVEL15-vmalloc-no-glock-20070418

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.

(cherry picked from commit 9943fe1fd71fc29331dcac7cd6a51bd37f307876)
src/afs/LINUX/osi_alloc.c