From owner-freebsd-stable@FreeBSD.ORG Thu Aug 9 18:27:01 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A6AF106566C; Thu, 9 Aug 2012 18:27:01 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 542C38FC14; Thu, 9 Aug 2012 18:26:59 +0000 (UTC) Received: by lage12 with SMTP id e12so508369lag.13 for ; Thu, 09 Aug 2012 11:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1hvwvgRs6asza1fpEBZqxVNX63hgmJGUy6nyw8l7bEI=; b=xnmjUyDkjwY78Z/NxW+X0m90kAwQX86YDlb+VLkTZuT1Gl+YcDH1fjJ7xF057n4yqt VbjGjrY/PbL3ZC6KURoLA1pCwA9MBOMpV6p1/c9COcY98ETI7TLQGPEeTFy/BzTSOACl UmaldSfGg7TL/oMaPJg4c6sLX6qVP+MFE21xUbqH/nrmKQFfUKw3UEcIyIPqEIW1UFWh ib89InF2zyo3vIMG7BTewGefHE4A2J975PxEogLQ93RgcELEosRNPMF2nsYhoPOzuiEc N26cTi+di7KqRiuEaMJHhBV/yePhQI8NF5tTHZS2YDNsKsJkXLVWCZ3osfeBq2dOvIJz 51qw== MIME-Version: 1.0 Received: by 10.112.36.42 with SMTP id n10mr1266066lbj.7.1344536818804; Thu, 09 Aug 2012 11:26:58 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.84.8 with HTTP; Thu, 9 Aug 2012 11:26:58 -0700 (PDT) In-Reply-To: <5022840B.3060708@omnilan.de> References: <5022840B.3060708@omnilan.de> Date: Thu, 9 Aug 2012 19:26:58 +0100 X-Google-Sender-Auth: UU3P3hNDiCaGdLjsPGInlBZUY5Q Message-ID: From: Attilio Rao To: Harald Schmalzbauer Content-Type: multipart/mixed; boundary=e0cb4efe309e78e8fb04c6d95f1e Cc: stable@freebsd.org, daichi@freebsd.org, Pavel Polyakov Subject: Re: lock violation in unionfs (9.0-STABLE r230270) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2012 18:27:01 -0000 --e0cb4efe309e78e8fb04c6d95f1e Content-Type: text/plain; charset=UTF-8 On 8/8/12, Harald Schmalzbauer wrote: > schrieb Pavel Polyakov am 06.03.2012 11:20 (localtime): >>>> mount -t unionfs -o noatime /usr /mnt >>>> >>>> insmntque: mp-safe fs and non-locked vp: 0xfffffe01d96704f0 is not >>>> exclusive locked but should be >>>> KDB: enter: lock violation >>> >>> Pavel, >>> can you give a spin to this patch?: >>> http://www.freebsd.org/~attilio/unionfs_missing_insmntque_lock.patch >>> >>> I think that the unlocking is due at that point as the vnode lock can >>> be switch later on. >>> >>> Let me know what you think about it and what the test does. >> >> Thanks! >> This patch fixes the problem with lock violation. Sorry I've tested it so >> late. > > Hello, > > this patch still applies cleanly to RELENG_9_1. Was there another fix > for the issue or has it just not been PR-sent and thus forgotten? Can you and Pavel try the attached patch? Unfortunately I had no time to test it, I just made in 5 free mins from a non-FreeBSD workstation, then you should be able to tell me if it works or not, even compiling it on a RELENG_9_1. Please try with INVARIANTS option on. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein --e0cb4efe309e78e8fb04c6d95f1e Content-Type: text/x-patch; charset=US-ASCII; name="unionfs_nodeget.patch" Content-Disposition: attachment; filename="unionfs_nodeget.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 SW5kZXg6IHN5cy9mcy91bmlvbmZzL3VuaW9uX3N1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