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, May 21, 1:03 PM
Unknown Object (File)
Wed, May 20, 11:55 AM
Unknown Object (File)
Wed, May 20, 6:20 AM
Unknown Object (File)
Fri, May 15, 11:35 PM
Unknown Object (File)
Wed, May 13, 9:35 AM
Unknown Object (File)
Wed, May 13, 1:51 AM
Unknown Object (File)
Wed, May 13, 1:51 AM
Unknown Object (File)
Wed, May 6, 1:42 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable