summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-26 21:26:51 (GMT)
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-30 13:19:38 (GMT)
commitd7631250b20119ea763d9ba461c3a9c5710cfa98 (patch)
tree1e5b99d2a3228c934f36eed156fd02938b620c2d
parent6b2fddd3e7f7cd437fb234407d7504fd22caf064 (diff)
downloadlinux-fsl-qoriq-d7631250b20119ea763d9ba461c3a9c5710cfa98.tar.xz
NFSv4: Fix a potentially Oopsable condition in __nfs_idmap_unregister
Ensure that __nfs_idmap_unregister can be called twice without consequences. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/idmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index e9b0c59..8b7e94a 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -404,8 +404,10 @@ static struct key_type key_type_id_resolver_legacy = {
static void __nfs_idmap_unregister(struct rpc_pipe *pipe)
{
- if (pipe->dentry)
+ if (pipe->dentry) {
rpc_unlink(pipe->dentry);
+ pipe->dentry = NULL;
+ }
}
static int __nfs_idmap_register(struct dentry *dir,