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, Oct 9, 3:50 PM
Unknown Object (File)
Wed, Oct 1, 6:55 AM
Unknown Object (File)
Fri, Sep 26, 12:01 PM
Unknown Object (File)
Thu, Sep 25, 8:38 PM
Unknown Object (File)
Sat, Sep 20, 4:04 PM
Unknown Object (File)
Sep 15 2025, 10:43 PM
Unknown Object (File)
Sep 12 2025, 6:41 AM
Unknown Object (File)
Sep 11 2025, 9:52 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