Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jun 2003 21:57:21 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Martin Blapp <mb@imp.ch>
Cc:        stable@freebsd.org
Subject:   Re: nfs panic with umount -f 
Message-ID:  <200306112157.aa90746@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Wed, 11 Jun 2003 22:30:51 %2B0200." <20030611222442.S97484@cvs.imp.ch> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20030611222442.S97484@cvs.imp.ch>, 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.

Ian

Index: nfs_vnops.c
===================================================================
RCS file: /FreeBSD/FreeBSD-CVS/src/sys/nfs/Attic/nfs_vnops.c,v
retrieving revision 1.150.2.5
diff -u -r1.150.2.5 nfs_vnops.c
--- nfs_vnops.c	20 Dec 2001 19:56:28 -0000	1.150.2.5
+++ 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));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306112157.aa90746>