From owner-freebsd-current@FreeBSD.ORG Mon Nov 3 22:48:18 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 4B66D1065673; Mon, 3 Nov 2008 22:48:18 +0000 (UTC) (envelope-from fbsd-fs@mawer.org) Received: from outbound.icp-qv1-irony-out3.iinet.net.au (outbound.icp-qv1-irony-out3.iinet.net.au [203.59.1.148]) by mx1.freebsd.org (Postfix) with ESMTP id D4F898FC08; Mon, 3 Nov 2008 22:48:16 +0000 (UTC) (envelope-from fbsd-fs@mawer.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AioBACsHD0nLzq3r/2dsb2JhbAAIzBKDUg X-IronPort-AV: E=Sophos;i="4.33,538,1220198400"; d="scan'208";a="347147185" Received: from unknown (HELO [10.24.1.1]) ([203.206.173.235]) by outbound.icp-qv1-irony-out3.iinet.net.au with ESMTP; 04 Nov 2008 07:18:04 +0900 Message-ID: <490F77ED.9050501@mawer.org> Date: Tue, 04 Nov 2008 09:15:09 +1100 From: Antony Mawer User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Attilio Rao References: <20081102123100.GA1434@darklight.homeunix.org> <3bbf2fe10811020737g211dfb3fs54b48e4071db2393@mail.gmail.com> <3bbf2fe10811020817g1409a38ep26c1ee8edf075201@mail.gmail.com> <200811031458.42549.jhb@freebsd.org> <3bbf2fe10811031320o5d977babpe37bcf22836b8d34@mail.gmail.com> In-Reply-To: <3bbf2fe10811031320o5d977babpe37bcf22836b8d34@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 03 Nov 2008 23:03:33 +0000 Cc: freebsd-fs@freebsd.org, developers@freebsd.org, Yuri Pankov , freebsd-current@freebsd.org, Robert Watson 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 22:48:18 -0000 Attilio Rao wrote: > 2008/11/3, Robert Watson : >> 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. > > I agree with Robert. > We need to make an upper layers analysis and decide what is the best > solution for locks. > This was a quick hack just to let it not panic when mounting. This probably also applies to NWFS and netncp as well -- I haven't had a chance to test NWFS in 7.x as of yet, but will hope to do so in the coming months... --Antony