HomeFreeBSD

unionfs: release parent vnodes in deferred context

Description

unionfs: release parent vnodes in deferred context

Each unionfs node holds a reference to its parent directory vnode.
A single open file reference can therefore end up keeping an
arbitrarily deep vnode hierarchy in place. When that reference is
released, the resulting VOP_RECLAIM call chain can then exhaust the
kernel stack.

This is easily reproducible by running the unionfs.sh stress2 test.
Fix it by deferring recursive unionfs vnode release to taskqueue
context.

PR: 238883
Reviewed By: kib (earlier version), markj
Differential Revision: https://reviews.freebsd.org/D30748

Details

Provenance
jahAuthored on Jun 12 2021, 7:45 PM
Reviewer
kib
Differential Revision
D30748: unionfs: release parent vnodes in deferred context
Parents
rG435754a59ee2: Add infrastructure required for Linux coredump support
Branches
Unknown
Tags
Unknown