From 526b3ccc0d89aac616c45387d5f5dd5d65832e70 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 6 Sep 2000 17:51:54 +0000 Subject: 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 --- sys/kern/vfs_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') 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] = -- cgit v1.1