diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2002-03-25 21:30:50 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2002-03-25 21:30:50 +0000 |
commit | 0beb3ecc6c8df2d621e49b96a4a6c8e1164632ac (patch) | |
tree | 05b8743ef95b8080f017a19e420874587507c5ab /sys/kern | |
parent | ea4122d2bf741fef648e16aa82ad42f5a3ba5382 (diff) | |
download | src-0beb3ecc6c8df2d621e49b96a4a6c8e1164632ac.tar.gz src-0beb3ecc6c8df2d621e49b96a4a6c8e1164632ac.zip |
Commit work-around for panics when mounting FS's that are auto-loaded as
modules (ie. procfs.ko).
When the kernel loads dynamic filesystem module, it looks for any of the
VOP operations specified by the new filesystem that have not been registered
already by the currently known filesystems. If any of such operations exist,
vfs_add_vnops function calls vfs_opv_recalc function, which rebuilds vop_t
vectors for each filesystem and sets all global pointers like ufs_vnops_p,
devfs_specop_p, etc to the new values and then frees the old pointers. This
behavior is bad because there might be already active vnodes whose v_op fields
will be left pointing to the random garbage, leading to inevitable crash soon.
Submitted by: Alexander Kabaev <ak03@gte.com>
Notes
Notes:
svn path=/head/; revision=93170
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index ce0ad37b71e4..7446258db488 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -129,8 +129,10 @@ vfs_opv_recalc(void) for (i = 0; i < vnodeopv_num; i++) { opv = vnodeopv_descs[i]; opv_desc_vector_p = opv->opv_desc_vector_p; +#ifdef WANT_BAD_JUJU if (*opv_desc_vector_p) FREE(*opv_desc_vector_p, M_VNODE); +#endif MALLOC(*opv_desc_vector_p, vop_t **, vfs_opv_numops * sizeof(vop_t *), M_VNODE, M_WAITOK | M_ZERO); |