projects
/
wrapfs-2.6.38.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cfb372
)
NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid
author
Trond Myklebust
<trond.myklebust@hammerspace.com>
Fri, 19 Jul 2019 17:48:44 +0000
(13:48 -0400)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:30:12 +0000
(08:30 +0200)
[ Upstream commit
8c39a39e28b86a4021d9be314ce01019bafa5fdc
]
It is unsafe to dereference delegation outside the rcu lock, and in
any case, the refcount is guaranteed held if cred is non-zero.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index 63edda145d1b88a9416077e276abb0901ffa8de9..420f2350c2781b6096fcd132ebfdebfc1299b002 100644
(file)
--- a/
fs/nfs/nfs4proc.c
+++ b/
fs/nfs/nfs4proc.c
@@
-2752,8
+2752,7
@@
static void nfs41_check_delegation_stateid(struct nfs4_state *state)
if (status == -NFS4ERR_EXPIRED || status == -NFS4ERR_BAD_STATEID)
nfs_finish_clear_delegation_stateid(state, &stateid);
- if (delegation->cred)
- put_cred(cred);
+ put_cred(cred);
}
/**