diff options
author | Trond Myklebust <trondmy@gmail.com> | 2019-06-20 16:47:40 +0200 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-06-21 20:45:09 +0200 |
commit | 19d55046cd824baab53534ba7e7f99945c6fdcb1 (patch) | |
tree | 2d07b1e71d1f987d7a38496abe2d10e3c19c3ea4 /net/sunrpc/clnt.c | |
parent | Revert "SUNRPC: Declare RPC timers as TIMER_DEFERRABLE" (diff) | |
download | linux-19d55046cd824baab53534ba7e7f99945c6fdcb1.tar.xz linux-19d55046cd824baab53534ba7e7f99945c6fdcb1.zip |
SUNRPC: Fix a credential refcount leak
All callers of __rpc_clone_client() pass in a value for args->cred,
meaning that the credential gets assigned and referenced in
the call to rpc_new_client().
Reported-by: Ido Schimmel <idosch@idosch.org>
Fixes: 79caa5fad47c ("SUNRPC: Cache cred of process creating the rpc_client")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Tested-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to '')
-rw-r--r-- | net/sunrpc/clnt.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 2b353472364f..b03bfa055c08 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -634,7 +634,6 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args, new->cl_discrtry = clnt->cl_discrtry; new->cl_chatty = clnt->cl_chatty; new->cl_principal = clnt->cl_principal; - new->cl_cred = get_cred(clnt->cl_cred); return new; out_err: |