HomeFreeBSD

null_bypass(): prevent loosing the only reference to the lower vnode

Description

null_bypass(): prevent loosing the only reference to the lower vnode

The upper vnode reference to the lower vnode is the only reference that
keeps our pointer to the lower vnode alive. If lower vnode is relocked
during the VOP call, upper vnode might become unlocked and reclaimed,
which invalidates our reference.

Add a transient vhold around VOP call.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31310

Details

Provenance
kibAuthored on Jul 20 2021, 12:53 AM
Reviewer
markj
Differential Revision
D31310: Several fixes for nullfs and fifofs
Parents
rG161e9a97363d: nullfs: provide custom null_advlock bypass
Branches
Unknown
Tags
Unknown