]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFS: use refcount_inc_not_zero nfs_start_delegation_return
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Jan 2026 07:27:10 +0000 (08:27 +0100)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 20 Jan 2026 19:49:47 +0000 (14:49 -0500)
commit36e3e9387b367bd0cef3437d8181a6d6cb3c3b3f
tree559625e422354a018a12c498db15a3259ebd43fb
parente96d9ca486b8310abc3736f45b45a91f0628b041
NFS: use refcount_inc_not_zero nfs_start_delegation_return

Using the unconditional reference increment means we can take a
reference to a delegation already in the RCU grace period, which could
cause a use after free under very unlikely conditions.  Switch to use
refcount_inc_not_zero instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/delegation.c