From owner-freebsd-current@FreeBSD.ORG Mon Nov 3 21:07:28 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4A1B106564A; Mon, 3 Nov 2008 21:07:28 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9BAAB8FC1C; Mon, 3 Nov 2008 21:07:28 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTP id 3098B46B03; Mon, 3 Nov 2008 16:07:28 -0500 (EST) Date: Mon, 3 Nov 2008 21:07:28 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200811031458.42549.jhb@freebsd.org> Message-ID: References: <20081102123100.GA1434@darklight.homeunix.org> <3bbf2fe10811020737g211dfb3fs54b48e4071db2393@mail.gmail.com> <3bbf2fe10811020817g1409a38ep26c1ee8edf075201@mail.gmail.com> <200811031458.42549.jhb@freebsd.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Attilio Rao , Yuri Pankov , freebsd-current@freebsd.org, freebsd-fs@freebsd.org, developers@freebsd.org Subject: Re: reproducible panic with mount_smbfs 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: Mon, 03 Nov 2008 21:07:28 -0000 On Mon, 3 Nov 2008, John Baldwin wrote: >> Yuri, could you please test this fix: >> http://www.freebsd.org/~attilio/netsmb.diff >> >> and report if it works? You could get a KASSERT running but this is >> expected as I want to identify on the callers who passes a malformed >> request and fix it. > > This allows all smb locks to recurse unlike the original code I think. It > may be better if smb_vclist was initialized with LK_RECURSE, but not all the > other smb locks. Also, in smb_co_addchild() I think you should just replace > the existing asserts with appropriate lockmgr_assert() (you could add a > smb_co_assert() to preserve the layering) rather than removing assertions > altogether. My general feeling is that the locking in netsmb needs a bit of cleanup, updating, etc. I'm reluctant to change the underlying primitives (as this patch does) without first clarifying what's going on in the code a layer or two above. Robert N M Watson Computer Laboratory University of Cambridge