HomeFreeBSD

devfs: unlock the directory vnode around the call to dev_clone handler

Description

devfs: unlock the directory vnode around the call to dev_clone handler

The lock around dev_clone is unfortunate because cloner might need to
take its own locks that establish the order with devfs vnodes, and then
transiently participates in further VFS locks order. For instance, this
way the proctree_lock or allproc_lock become involved.

Unlock dvp, we can unwind if the vnode become doomed while cloner was
called.

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

Details

Provenance
kibAuthored on Jan 26 2026, 1:49 AM
Reviewer
kevans
Differential Revision
D55028: devfs: unlock the directory vnode around the call to dev_clone handler
Parents
rG9e0fe126714c: i386: Fix build and remove empty unused macro
Branches
Unknown
Tags
Unknown