From owner-freebsd-current@FreeBSD.ORG Sat Jul 15 04:49:57 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3A9816A4E1; Sat, 15 Jul 2006 04:49:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4332443D58; Sat, 15 Jul 2006 04:49:57 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6F4nY3v018575; Sat, 15 Jul 2006 00:49:35 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: SANETO Takanori Date: Sat, 15 Jul 2006 00:43:37 -0400 User-Agent: KMail/1.9.1 References: <200607111101.47747.jhb@freebsd.org> <44B85EBA.3080207@ba2.so-net.ne.jp> In-Reply-To: <44B85EBA.3080207@ba2.so-net.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607150043.37683.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Sat, 15 Jul 2006 00:49:35 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1599/Fri Jul 14 01:35:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: bp@freebsd.org, freebsd-current@freebsd.org, Jiawei Ye Subject: Re: lockmgr: thread 0xc21e2780 unlocking unheld lock X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jul 2006 04:49:57 -0000 On Friday 14 July 2006 23:19, SANETO Takanori wrote: > I think that "==" should be "!=" in the patched code. Yeah, I fixed that in an updated patch to the OP that includes another fix for a missing lock in smbfs_unmount(). > John Baldwin wrote: > > On Tuesday 11 July 2006 09:29, Jiawei Ye wrote: > >> I was doing "sudo mount_smbfs //user@server/share /mnt" when the > >> following msg appeared. smbfs.ko was not loaded. > > > > Does building with INVARIANTS fix it? If so, try this patch (it looks > > like it has been broken since 1.1 of the smbfs code): > > > > Index: smb_conn.c > > =================================================================== > > RCS file: /usr/cvs/src/sys/netsmb/smb_conn.c,v > > retrieving revision 1.16 > > diff -u -r1.16 smb_conn.c > > --- smb_conn.c 31 Oct 2005 15:41:27 -0000 1.16 > > +++ smb_conn.c 11 Jul 2006 15:01:10 -0000 > > @@ -233,7 +233,8 @@ > > lockinit(&cp->co_lock, PZERO, objname, 0, 0); > > cp->co_level = level; > > cp->co_usecount = 1; > > - KASSERT(smb_co_lock(cp, LK_EXCLUSIVE, td) == 0, ("smb_co_init: lock > > failed")); > > + if (smb_co_lock(cp, LK_EXCLUSIVE, td) == 0) > > + panic("smb_co_init: lock failed")); > > } > > > > static void > > > > -- John Baldwin