vfs: validate that a mount point with FPLOOKUP has vop_fplookup ops

This commit is contained in:
Mateusz Guzik 2023-04-05 23:10:34 +00:00
parent e237e2ba5f
commit f87a9f51ef

View File

@ -1800,6 +1800,10 @@ getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops,
KASSERT(vops->registered,
("%s: not registered vector op %p\n", __func__, vops));
if (mp != NULL && (mp->mnt_kern_flag & MNTK_FPLOOKUP) != 0) {
MPASS(vops->vop_fplookup_vexec != VOP_PANIC);
MPASS(vops->vop_fplookup_symlink != VOP_PANIC);
}
td = curthread;
if (td->td_vp_reserved != NULL) {