6.2 amd64 panic: lockmgr: thread 0xffffff009f9fd000, not exclusive lock holder 0xffffff003961c000 unlocking

Kostik Belousov kostikbel at gmail.com
Thu Feb 1 17:04:21 UTC 2007


On Thu, Feb 01, 2007 at 10:55:18AM -0600, Guy Helmer wrote:
> Kostik Belousov wrote:
> >On Thu, Feb 01, 2007 at 06:38:26PM +0200, Kostik Belousov wrote:
> >
> >Index: fs/procfs/procfs.c
> >===================================================================
> >RCS file: /usr/local/arch/ncvs/src/sys/fs/procfs/procfs.c,v
> >retrieving revision 1.14
> >diff -u -r1.14 procfs.c
> >--- fs/procfs/procfs.c	5 Jun 2006 16:41:27 -0000	1.14
> >+++ fs/procfs/procfs.c	1 Feb 2007 16:44:41 -0000
> >@@ -69,10 +69,17 @@
> > {
> > 	char *fullpath = "unknown";
> > 	char *freepath = NULL;
> >+	struct vnode *textvp;
> >+	int err;
> > 
> >-	vn_lock(p->p_textvp, LK_EXCLUSIVE | LK_RETRY, td);
> >-	vn_fullpath(td, p->p_textvp, &fullpath, &freepath);
> >-	VOP_UNLOCK(p->p_textvp, 0, td);
> >+	textvp = p->p_textvp;
> >+	VI_LOCK(textvp);
> >+	vholdl(textvp);
> >+	err = vn_lock(textvp, LK_EXCLUSIVE | LK_INTERLOCK, td);
> >+	vdrop(textvp);
> >+	if (err)
> >  
> Shouldn't that be "if (!err)"?
No, vn_lock() returns non-zero on error.

> >+	vn_fullpath(td, textvp, &fullpath, &freepath);
> >+	VOP_UNLOCK(textvp, 0, td);
> > 	sbuf_printf(sb, "%s", fullpath);
> > 	if (freepath)
> > 		free(freepath, M_TEMP);
> >  
> Thanks for your insight and patch!
I would appreciate testing results :). 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20070201/7dab59de/attachment.pgp


More information about the freebsd-stable mailing list