The page says vp has no need to be locked, which reads as permission to
pass an exclusively locked vnode. A name cache miss then takes LK_SHARED
on that same vnode in the fallback path.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 78661 Build 75544: arc lint + arc unit
Event Timeline
Comment Actions
It is not legal to hold any vnode locks across a call to vn_fullpath. In particular having the vp locked threatens a deadlock against normal path lookup, as the reconstruction grabs one lock at a time the opposite way. So you can have the child locked and stall waiting for the parent, while the forward lookup just locked the parent and now wants the child.
Comment Actions
I don't think the description of the deadlock fits the manapge, i provided it only for illustrative purposes. If one was to talk about something like this, I have to point out there are other ways to deadlock.
I think a mere statement that no vnode locks are to be held is more than sufficient in this context.