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)
Wed, Jan 15, 4:15 PM
Unknown Object (File)
Dec 14 2024, 8:10 AM
Unknown Object (File)
Dec 2 2024, 7:11 PM
Unknown Object (File)
Nov 14 2024, 12:56 PM
Unknown Object (File)
Oct 2 2024, 12:34 PM
Unknown Object (File)
Sep 30 2024, 4:02 PM
Unknown Object (File)
Sep 30 2024, 1:02 PM
Unknown Object (File)
Sep 27 2024, 9:38 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