Page MenuHomeFreeBSD

mount: Check for !VDIR mount points before handling -o emptydir
ClosedPublic

Authored by markj on Oct 13 2021, 12:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 27, 5:19 AM
Unknown Object (File)
Tue, Nov 18, 1:00 PM
Unknown Object (File)
Nov 8 2025, 12:18 AM
Unknown Object (File)
Nov 6 2025, 3:46 PM
Unknown Object (File)
Nov 5 2025, 6:53 PM
Unknown Object (File)
Nov 5 2025, 5:52 PM
Unknown Object (File)
Nov 1 2025, 10:30 AM
Unknown Object (File)
Oct 24 2025, 1:39 AM
Subscribers

Details

Summary

To implement -o emptydir, vfs_emptydir() checks that the passed
directory is empty. This should be done after checking whether the
vnode is of type VDIR, though, or vfs_emptydir() may end up calling
VOP_READDIR on a non-directory.

Reported by: syzbot+4006732c69fb0f792b2c@syzkaller.appspotmail.com

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42095
Build 38983: arc lint + arc unit