summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-09-06 17:51:54 +0000
committerpeter <peter@FreeBSD.org>2000-09-06 17:51:54 +0000
commit526b3ccc0d89aac616c45387d5f5dd5d65832e70 (patch)
treeea36f1e6f9d9db5e5a4e6d9b9c0a31518aafc9de /sys
parent93fc8a1033b7da4a910f6786e5aa4480a95e1af4 (diff)
downloadFreeBSD-src-526b3ccc0d89aac616c45387d5f5dd5d65832e70.zip
FreeBSD-src-526b3ccc0d89aac616c45387d5f5dd5d65832e70.tar.gz
Do not panic on an uninitialized VOP_xxx() call. This was meant as a
sanity check, but it is too easy to run into, eg: making an ACL syscall when no filesystems have the ACL implementation enabled. The original reason for the panic was that the VOP_ vector had not been assigned and therefor could not be passed down the stack.. and there was no point passing it down since nothing implemented it anyway. vop_defaultop entries could not pass it on because it had a zero (unknown) vector that was indistinguishable from another unknown VOP vector. Anyway, we can do something reasonable in this case, we shouldn't need to panic here as there is a reasonable recovery option (return EOPNOTSUPP and dont pass it down the stack). Requested by: rwatson
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index bae031b..d0fff71 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -130,9 +130,9 @@ vfs_opv_recalc(void)
panic("no memory for vop_t ** vector");
bzero(*opv_desc_vector_p, vfs_opv_numops * sizeof(vop_t *));
- /* Fill in, with slot 0 being panic */
+ /* Fill in, with slot 0 being to return EOPNOTSUPP */
opv_desc_vector = *opv_desc_vector_p;
- opv_desc_vector[0] = (vop_t *)vop_panic;
+ opv_desc_vector[0] = (vop_t *)vop_eopnotsupp;
for (j = 0; opv->opv_desc_ops[j].opve_op; j++) {
opve_descp = &(opv->opv_desc_ops[j]);
opv_desc_vector[opve_descp->opve_op->vdesc_offset] =
OpenPOWER on IntegriCloud