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)
Fri, Jan 16, 11:50 PM
Unknown Object (File)
Wed, Jan 14, 3:09 PM
Unknown Object (File)
Wed, Jan 14, 11:46 AM
Unknown Object (File)
Wed, Jan 7, 9:45 PM
Unknown Object (File)
Mon, Jan 5, 5:43 PM
Unknown Object (File)
Mon, Dec 29, 7:57 PM
Unknown Object (File)
Nov 27 2025, 5:19 AM
Unknown Object (File)
Nov 18 2025, 1:00 PM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable