nfs panic with umount -f

Ian Dowse iedowse at
Wed Jun 11 13:57:24 PDT 2003

In message <20030611222442.S97484 at>, Martin Blapp writes:
>Hi Ian and others,
>umount(8) -f does crash here on several just updated 4.8STABLE
>boxes for nfs volumes. Server is an IRIX server. All clients are FreeBSD.

Something like this should fix it I think - the code is assuming
that a directory vnode it saved has not been vgone'd in the meantime,
so it can blow up when it tries to use it as ans NFS node. This can
happen during umount -f if the directory vnode gets cleaned before
the vnode of the sillyrename file.


Index: nfs_vnops.c
RCS file: /FreeBSD/FreeBSD-CVS/src/sys/nfs/Attic/nfs_vnops.c,v
retrieving revision
diff -u -r1.150.2.5 nfs_vnops.c
--- nfs_vnops.c	20 Dec 2001 19:56:28 -0000
+++ nfs_vnops.c	11 Jun 2003 20:53:56 -0000
@@ -1558,6 +1558,9 @@
 	register struct sillyrename *sp;
+	/* Make sure the directory vnode has not been vgone'd. */
+	if (sp->s_dvp->v_type == VBAD)
+		return (0);
 	return (nfs_removerpc(sp->s_dvp, sp->s_name, sp->s_namlen, sp->s_cred,
 		(struct proc *)0));

More information about the freebsd-stable mailing list