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)
Feb 19 2024, 10:10 PM
Unknown Object (File)
Feb 10 2024, 9:38 PM
Unknown Object (File)
Jan 28 2024, 1:09 AM
Unknown Object (File)
Dec 20 2023, 12:06 PM
Unknown Object (File)
Dec 20 2023, 6:44 AM
Unknown Object (File)
Oct 29 2023, 5:36 AM
Unknown Object (File)
Sep 29 2023, 1:25 PM
Unknown Object (File)
Aug 10 2023, 10:09 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