projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93870d7
)
SUNRPC: Dont run rpcauth_cache_shrinker() when gfp_mask is GFP_NOFS
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Thu, 13 May 2010 16:51:03 +0000
(12:51 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Fri, 14 May 2010 19:09:34 +0000
(15:09 -0400)
Under some circumstances, put_rpccred() can end up allocating memory, so
check the gfp_mask to prevent deadlocks.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/auth.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sunrpc/auth.c
b/net/sunrpc/auth.c
index 95afe79dd9d74ea14568f63a73a082ac31f9b887..0667a36aee7878c176f3c21d74305080305e0dc6 100644
(file)
--- a/
net/sunrpc/auth.c
+++ b/
net/sunrpc/auth.c
@@
-270,6
+270,8
@@
rpcauth_cache_shrinker(int nr_to_scan, gfp_t gfp_mask)
LIST_HEAD(free);
int res;
+ if ((gfp_mask & GFP_KERNEL) != GFP_KERNEL)
+ return (nr_to_scan == 0) ? 0 : -1;
if (list_empty(&cred_unused))
return 0;
spin_lock(&rpc_credcache_lock);