提交 8c39a39e 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 e21a712a
......@@ -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);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册