HomeFreeBSD

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

Description

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

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
Reviewed by: kib, imp
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32475

Details

Provenance
markjAuthored on Oct 13 2021, 12:11 AM
Reviewer
kib
Differential Revision
D32475: mount: Check for !VDIR mount points before handling -o emptydir
Parents
rGd0f0e0bd741a: rtld: Do not install libmap.conf when installing the COMPAT32 version
Branches
Unknown
Tags
Unknown