diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:09 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:09 -0500 |
commit | 12de3b35ea549c5819f287508d7afab0bf3ac44d (patch) | |
tree | c1b7f96236c4b19bcd911705017bf31bcbc2b605 /net/sunrpc/clnt.c | |
parent | 24c5d9d7ea5a64fb5f157d17aa2c67a3300f8a08 (diff) | |
download | op-kernel-dev-12de3b35ea549c5819f287508d7afab0bf3ac44d.zip op-kernel-dev-12de3b35ea549c5819f287508d7afab0bf3ac44d.tar.gz |
SUNRPC: Ensure that rpc_mkpipe returns a refcounted dentry
If not, we cannot guarantee that idmap->idmap_dentry, gss_auth->dentry and
clnt->cl_dentry are valid dentries.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index d784797..a6d7c33 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -240,6 +240,7 @@ rpc_clone_client(struct rpc_clnt *clnt) new->cl_autobind = 0; new->cl_oneshot = 0; new->cl_dead = 0; + dget(new->cl_dentry); rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); if (new->cl_auth) atomic_inc(&new->cl_auth->au_count); @@ -314,6 +315,8 @@ rpc_destroy_client(struct rpc_clnt *clnt) if (clnt->cl_server != clnt->cl_inline_name) kfree(clnt->cl_server); out_free: + if (clnt->cl_dentry) + dput(clnt->cl_dentry); kfree(clnt); return 0; } |