]> www.infradead.org Git - users/dwmw2/linux.git/commit
NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 19 Jul 2019 17:48:44 +0000 (13:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:30:12 +0000 (08:30 +0200)
commit8c0391db53efffb30913c06367f1b3793fc3ba18
tree0e0f6f4664363bb2b6be2c0fa0c320604fb62316
parent1cfb3722bb57d257148c77f87468c19eeaa852a2
NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid

[ 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