svn commit: r368360 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Sat Dec 5 05:56:23 UTC 2020
Author: mjg
Date: Sat Dec 5 05:56:23 2020
New Revision: 368360
URL: https://svnweb.freebsd.org/changeset/base/368360
Log:
vfs: keep bad ops on vnode reclaim
They were only modified to accomodate a redundant assertion.
This runs into problems as lockless lookup can still try to use the vnode
and crash instead of getting an error.
The bug was only present in kernels with INVARIANTS.
Reported by: kevans
Modified:
head/sys/kern/vfs_subr.c
Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c Sat Dec 5 03:18:48 2020 (r368359)
+++ head/sys/kern/vfs_subr.c Sat Dec 5 05:56:23 2020 (r368360)
@@ -1816,10 +1816,6 @@ freevnode(struct vnode *vp)
destroy_vpollinfo(vp->v_pollinfo);
vp->v_pollinfo = NULL;
}
-#ifdef INVARIANTS
- /* XXX Elsewhere we detect an already freed vnode via NULL v_op. */
- vp->v_op = NULL;
-#endif
vp->v_mountedhere = NULL;
vp->v_unpcb = NULL;
vp->v_rdev = NULL;
@@ -3458,8 +3454,6 @@ vdrop_deactivate(struct vnode *vp)
*/
VNASSERT(!VN_IS_DOOMED(vp), vp,
("vdrop: returning doomed vnode"));
- VNASSERT(vp->v_op != NULL, vp,
- ("vdrop: vnode already reclaimed."));
VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp,
("vnode with VI_OWEINACT set"));
VNASSERT((vp->v_iflag & VI_DEFINACT) == 0, vp,
More information about the svn-src-head
mailing list