diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-01-07 08:27:08 +0100 |
|---|---|---|
| committer | Anna Schumaker <anna.schumaker@oracle.com> | 2026-01-20 14:49:46 -0500 |
| commit | 542b11c0728335a1e06f61dc71b48e9bbbe13169 (patch) | |
| tree | 273190dd637f706f10b2e42bc34e5a48b9e90953 /include/linux/i2c/git@git.tavy.me:linux.git | |
| parent | 23e6208755cae5afd350f6805c7ea70bfd2b336d (diff) | |
NFS: take a delegation reference in nfs4_get_valid_delegation
Currently most work on struct nfs_delegation happens directly under RCU
protection. This is generally fine, despite that long RCU sections are
not good for performance. But for operations later taking a reference
to the delegation to perform blocking work, refcount_inc is used, which
can be racy against dropping the last reference and thus lead to use
after frees in extremely rare cases.
Fix this by taking a reference in nfs4_get_valid_delegation using
refcount_inc_not_zero so that the callers have a stabilized reference
they can work with and can be moved outside the RCU critical section.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
