From owner-freebsd-fs@FreeBSD.ORG Wed Mar 18 09:25:08 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF037106567C for ; Wed, 18 Mar 2009 09:25:08 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f164.google.com (mail-bw0-f164.google.com [209.85.218.164]) by mx1.freebsd.org (Postfix) with ESMTP id 377C98FC1E for ; Wed, 18 Mar 2009 09:25:07 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by bwz8 with SMTP id 8so409168bwz.43 for ; Wed, 18 Mar 2009 02:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=scjrV3ZI3x22zBwdKrG1BFbgeR8uQQTLLcgRvDaF3vo=; b=vnNsGWFa/GYrhDhKBsJfCWQSI0WBbuwpkjB/HwUnJ9mDlxQsplv6gFI1je/sy/zncL Cq6DBGuTsASFdR2JHLcGxiakWxpBLopvP0mNzrNuCUkKFn4ntxVgbI5JUnKfK7u5mAHa 4C4xntukrlwV2CmbOhQ1v3tFa2o55TtGudsLk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=uwBHd2Bcg1W3D/kMgvNVlvP2kK/WmRDf8emGeYzgqcTVcO6DcaKlVvl3K6zCPq6CWE BbBlOEscsIk+3TTkdcI4hFHANpV2GmvTXYIvppOqq0nPKn3NQ0KT4l5h9+A07NU2Yjyn rUqAq1GV4pKbuTGVk1AKZcQtgwOqjTsjMRDM8= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.104.74 with SMTP id n10mr819446fao.5.1237366754969; Wed, 18 Mar 2009 01:59:14 -0700 (PDT) In-Reply-To: <20090314203215.GA41617@deviant.kiev.zoral.com.ua> References: <200903140450.n2E4o3to011990@freefall.freebsd.org> <20090314102135.GA93077@x2.osted.lan> <20090314203215.GA41617@deviant.kiev.zoral.com.ua> Date: Wed, 18 Mar 2009 09:59:14 +0100 X-Google-Sender-Auth: ce1aa07741d1ad1a Message-ID: <3bbf2fe10903180159x10d2c721rf9ff4147a5c75ec7@mail.gmail.com> From: Attilio Rao To: Kostik Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Yoshihiro Ota , Peter Holm , freebsd-fs@freebsd.org Subject: Re: kern/132597: [tmpfs] [panic] tmpfs-related panic while interrupting a port build on tmpfs WRKDIR X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2009 09:25:09 -0000 2009/3/14, Kostik Belousov : > On Sat, Mar 14, 2009 at 11:21:35AM +0100, Peter Holm wrote: > > On Sat, Mar 14, 2009 at 04:50:03AM +0000, Yoshihiro Ota wrote: > > > The following reply was made to PR kern/132597; it has been noted by GNATS. > > > > > > From: Yoshihiro Ota > > > To: bug-followup@FreeBSD.org > > > Cc: bf2006a@yahoo.com > > > Subject: Re: kern/132597: [tmpfs] [panic] tmpfs-related panic while > > > interrupting a port build on tmpfs WRKDIR > > > Date: Sat, 14 Mar 2009 00:42:58 -0400 > > > > > > Which ports were you compiling when panic happened? > > > > > > Hiro > > > > The panic in this PR looks a lot like the one I reported to attilio@ > > > > http://people.freebsd.org/~pho/stress/log/attilio022.txt > > > > It was just regular FS load that provoked it. > > > It seems to be quite clean what is going on there. In fact, there are > two issues: > > First is the usual problem of DOTDOT lookup that shall be fixed in style > of vn_vget_ino() by busying mp before unlocking dvp. > > Second one is the reason for the panic. The tmpfs vnode is unlocked, and > then corresponding tmpfs _node_ is passed to the tmpfs_alloc_vp(). > Since the vnode may be reclaimed after the unlock, passed node might > become freed. Then, the tmpfs_alloc_vp() would operate on the freed > memory. So I have a question. In the tmpfs_lookup() there is dvp with gets vhold() before to unlock the dvp vnode lock. That should not be enough to prevent recycling and freeing of the structure? Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein