HomeFreeBSD

vfs: fix reference counting/locking on LK_UPGRADE error

Description

vfs: fix reference counting/locking on LK_UPGRADE error

Factoring out this code unfortunately introduced reference and lock leaks in
case of failure in the lock upgrade path under VV_CROSSLOCK. In terms of
practical use, this impacts unionfs (and nullfs in a corner case).

Fixes: 80bd5ef07025 ("vfs: factor out mount point traversal to a dedicated routine")
MFC after: 3 days
MFC to: stable/14 releng/14.0
Sponsored by: The FreeBSD Foundation
Reviewed by: mjg
[mjg: massaged the commit message a little bit]

Differential Revision: https://reviews.freebsd.org/D41731

Details

Provenance
olceAuthored on Sep 22 2023, 8:57 PM
mjgCommitted on Sep 22 2023, 8:57 PM
Reviewer
mjg
Differential Revision
D41731: vfs_lookup_cross_mount(): Fix reference counting/locking on LK_UPGRADE error
Parents
rG407e2d7cf1b6: lastcomm: update i386 tests for additional timestamp resolution
Branches
Unknown
Tags
Unknown