From owner-freebsd-current@FreeBSD.ORG Mon Nov 3 21:20:06 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 3DA20106567A; Mon, 3 Nov 2008 21:20:06 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id 0E65D8FC14; Mon, 3 Nov 2008 21:20:04 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so2333526fgb.35 for ; Mon, 03 Nov 2008 13:20:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=TA8VijrUjPMwnow6ltL/iEf838fcTkqmMcT11ctPE5s=; b=dw4JktMRvmXUhousKiX2YsaudebigugenOz5Jv5y3eq9jC+BUNpfeLzHfRWpL+pdp7 cuh4iF8Ra0+LpPRkVksVS0/jygjNF7C3uaxmPfKpaOfWyN1thXCP022vmsriwOZAeKCm xk55v2RCuWyWj9o6qIMTIhkoEGY9ZiM5lUy70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=tz9CX3/hdkWTxeISgfoOYqnbSt4luzLJau/CrhGO9wTYkNKeHb4ie5FPNfCLBZUjwW 40mCYKp16qavI8QRM/dMUJHN+xO/y3E6m7TrrVdFpYpKa8BUPEi00loNsgOOs5U+pIID Wy4uUyCG0r7zmQT45KJTrXNN7tkF9VwzE4P3s= Received: by 10.86.23.17 with SMTP id 17mr527417fgw.0.1225747203803; Mon, 03 Nov 2008 13:20:03 -0800 (PST) Received: by 10.86.2.18 with HTTP; Mon, 3 Nov 2008 13:20:03 -0800 (PST) Message-ID: <3bbf2fe10811031320o5d977babpe37bcf22836b8d34@mail.gmail.com> Date: Mon, 3 Nov 2008 22:20:03 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Robert Watson" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081102123100.GA1434@darklight.homeunix.org> <3bbf2fe10811020737g211dfb3fs54b48e4071db2393@mail.gmail.com> <3bbf2fe10811020817g1409a38ep26c1ee8edf075201@mail.gmail.com> <200811031458.42549.jhb@freebsd.org> X-Google-Sender-Auth: 86ce34cb774d5f9b Cc: Yuri Pankov , freebsd-fs@freebsd.org, freebsd-current@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:20:06 -0000 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. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein