mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid
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 <[email protected]>
This commit is contained in:
1 parent
e21a712a96
commit
8c39a39e28
1 file changed
+1
-2
+1
-2
@@ -2778,8 +2778,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user