Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jun 2007 18:13:38 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        "Takanori Saneto" <sanewo@ba2.so-net.ne.jp>
Cc:        freebsd-current@freebsd.org
Subject:   Re: smb related problem
Message-ID:  <200706181813.38706.jhb@freebsd.org>
In-Reply-To: <639c2fce0706170327m549f1ea9m7da150202627a077@mail.gmail.com>
References:  <Pine.LNX.4.64.0704191600060.11366@afrodita.rcub.bg.ac.yu> <200706141404.56196.jhb@freebsd.org> <639c2fce0706170327m549f1ea9m7da150202627a077@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 17 June 2007 06:27:46 am Takanori Saneto wrote:
> OK, here it is:
> 
> smb_co_lock: recursive lock for object 1
> panic: recursive lock for object 0xc1b3e600
> KDB: enter: panic
> [thread pid 592 tid 100032 ]
> Stopped at    kdb_enter+0x32: leave
> db> bt
> Tracing pid 592 tid 100032 td 0xc1a44e00
> kdb_enter(c060f652, c066e920,c1b89b5a,cc398a70,cc398a70,...) at
> kdb_enter+0x32
> panic(x1b89b5a,c1b3e600,1,c1bc0638,cc398ab0,...) at panic+0xc4
> smb_share_lock(c1b3e600,2,c1a44e00,c,c1a44e00,...) at smb_share_lock
> smb_co_gone(c1bc0600,cc398ba4,cc398ba4,cc398ac8,c1bc0600,...) at
> smb_co_gone+0x3a
> smb_sm_lookup(cc398af4,cc398b30,cc398ba4,cc398b4c,c199041c,...) at
> smb_sm_lookup+0x16b
> smb_usr_lookup(c1990400,cc398ba4,cc398bb0,cc398bac,c060ac51,...) at
> smb_usr_lookup+0x95
> nsmb_dev_ioctl(c1b5b100,82fc6e6a,c1990400,3,c1a44e00,...) at
> nsmb_dev_ioctl+0x1d6

Hmm, ok.  Try this maybe:

Index: smb_conn.c
===================================================================
RCS file: /usr/cvs/src/sys/netsmb/smb_conn.c,v
retrieving revision 1.18
diff -u -r1.18 smb_conn.c
--- smb_conn.c	6 Nov 2006 13:42:06 -0000	1.18
+++ smb_conn.c	18 Jun 2007 22:12:33 -0000
@@ -212,8 +212,11 @@
 	error = smb_smb_treeconnect(ssp, scred);
 	if (error == 0)
 		vcspec->ssp = ssp;
-	else
+	else {
+		smb_vc_put(vcp, scred);
+		vcp = NULL;
 		smb_share_put(ssp, scred);
+	}
 out:
 	smb_sm_unlockvclist(td);
 	if (error == 0)
@@ -351,6 +354,7 @@
 	if (smb_co_lockstatus(cp, td) == LK_EXCLUSIVE && 
 	    (flags & LK_CANRECURSE) == 0) {
 		SMBERROR("recursive lock for object %d\n", cp->co_level);
+		panic("recursive lock for object %p", cp);
 		return 0;
 	}
 	return lockmgr(&cp->co_lock, flags, &cp->co_interlock, td);


-- 
John Baldwin



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