Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp641877yba; Wed, 3 Apr 2019 16:29:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEPcjZ4v5Vscjw0AN342Tjv+wXv9sxrVhkg7Kjmhkc6DvIoEGZu8ub6sjjqFZOkG5ec54M X-Received: by 2002:a17:902:ba85:: with SMTP id k5mr2881259pls.270.1554334187805; Wed, 03 Apr 2019 16:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554334187; cv=none; d=google.com; s=arc-20160816; b=mHrP8aTSq6JskcGX5ir0FkhK6y/2gEVK+KFMirAdOPhkXoPVYLgIiDkMclSx4FSCfM hYCPfA3kTMET67bnQ25AmRD+gBu6/n3WJxY1m3udgByJBCtTNkTmWVkC5hC8hZgVtvJs WLv8xRCn6k915axxqDQ6k7OBbe1hswnu4AQwZsT7IGDWmT66oS57JR/v/+U3Mz9A9EGn VGI6gWE6M8bxpPWfzbB2V6IvY410DIa/4UkLv0cpgUdM2mFdlPTvhWBNDLM/N9VHs84d DeXRKQuL/hVu5+kEkXrXprd+LKF0H8roAxXEVMrFjc3j8WbXqxs6HQtzhQZnZm9iT7ZG 9UKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:dkim-signature; bh=++5CMhroEuAjazs1tO09H63zbBQ5nzJdJ5d+2RHIrNc=; b=ZCg/o5kLBadDhAmdZAaYncJLJZl1uzFsk7Wk84EYfatu8lyZ5AKmGp65t5Gg+NwT5o HJEVyDLTQau5xZzKxNsglPNCc3whW7umdJTrppRtIIQrFTCYgRYBioDlNVsjokazy7NC 84WbA3woV7dC7SKXkznVJEtjYKPX+0aMsvYQGb+1vLAgTdxndnPbGsF3BtlY+6gXMxFz TyKLsG/PrwRKyGqErrSVRHz+KpOd8XCCrrqf1rJqENbkqHoH76l8vlhdxxXL/974eeY7 gKnoSWIn6wJn9m4t++Tm8LIqAO1xhbXuVrzRvuSf4hIFVFsVY1oxHCwRudxVHNXnkavv ILZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@themaw.net header.s=fm2 header.b=LyiATcFV; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=B9dIoUPR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj2si14082386plb.9.2019.04.03.16.29.32; Wed, 03 Apr 2019 16:29:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@themaw.net header.s=fm2 header.b=LyiATcFV; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=B9dIoUPR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbfDCX27 (ORCPT + 99 others); Wed, 3 Apr 2019 19:28:59 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33549 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbfDCX26 (ORCPT ); Wed, 3 Apr 2019 19:28:58 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 39B91222BA; Wed, 3 Apr 2019 19:28:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 03 Apr 2019 19:28:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; s=fm2; bh= ++5CMhroEuAjazs1tO09H63zbBQ5nzJdJ5d+2RHIrNc=; b=LyiATcFVKqYDfMIb snYj1Mt7Ispou1aZOmkyr1bFymLsYr6VeyKcm49DUxj84YSe/rq7xG23WiuMF6gn C5bKEgLToCWroLCUG6qp78PYRzL0BGfqOwxYnLgQ712a1V4t2te9ZMXmVP5AH+IU QelN435IgpRL8w7tNGcpyD/Q5B5woa0J4aS5nP4v/a3+RB74zQfYagmFcajMEraA Bx0gjbGUkYZZsMB6foeTihXloPSIaZmpxGyfw0vKw2/LkZMG/+R/0Od0VSxTQTwP gyrsAKhNcCS1B0ix59rpuUyQ4ObJOwXyJpcMvAQ8GR0SVHoM4wyRY/UUXmU5EEp1 DkVRCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=++5CMhroEuAjazs1tO09H63zbBQ5nzJdJ5d+2RHIr Nc=; b=B9dIoUPRAOVsLitQsTbmXna7UnkdDQvXapQk6TvX08Q99NQQAgMJK/alF bs9x0hNl0tkKHndC5VNaG+zLpn+1gyhco16EPCKeQ51EY+B3o2N9YtWBc3WvD+Io TSNUT09h9ZQoxP/0ZoPcbZYKylQ9tDBbZjRdXeIw4gmJxzT1RWZRHQS+sUcHkyRt d6ruTIsLvWyQq1mJ3rQqpc+cPmzTOzdgxFtMEcstRaZxC91yjs45r/3WcIWsP5/3 IqdRx5ORAtQrWQ1Ovwa1g9ajNrhZ7UWUjt7mj9AGtk9qBAVQCmjFb7bdW15jR2qG Y9vdsPfdZt/ShS5U6/1+FoW3U1B9g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtdeggddvudculddtuddrgedutddrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkuffhvfffjghftgfoggfgsehtjeertdertdej necuhfhrohhmpefkrghnucfmvghnthcuoehrrghvvghnsehthhgvmhgrfidrnhgvtheqne cukfhppeduudekrddvtdekrdeifedrvdefvdenucfrrghrrghmpehmrghilhhfrhhomhep rhgrvhgvnhesthhhvghmrgifrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from pluto.themaw.net (unknown [118.208.63.232]) by mail.messagingengine.com (Postfix) with ESMTPA id CD566E43A3; Wed, 3 Apr 2019 19:28:55 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by pluto.themaw.net (Postfix) with ESMTP id 61F711C0079; Thu, 4 Apr 2019 07:28:52 +0800 (AWST) Message-ID: <894091e9742896e4bc810458a9f71f3f59a48860.camel@themaw.net> Subject: Re: [PATCH v3 00/24] Convert vfs.txt to vfs.rst From: Ian Kent To: NeilBrown , Al Viro , Jonathan Corbet Cc: "Tobin C. Harding" , Mauro Carvalho Chehab , Randy Dunlap , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 04 Apr 2019 07:28:52 +0800 In-Reply-To: <87ftqz29i2.fsf@notabene.neil.brown.name> References: <20190327051717.23225-1-tobin@kernel.org> <20190402094934.5b242dc0@lwn.net> <20190402164824.GK2217@ZenIV.linux.org.uk> <20190402175401.GL2217@ZenIV.linux.org.uk> <20190402190811.GM2217@ZenIV.linux.org.uk> <5c5e02f8b8add4aa2fc24ba2a0880652529588af.camel@themaw.net> <87ftqz29i2.fsf@notabene.neil.brown.name> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-2.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-04-03 at 11:55 +1100, NeilBrown wrote: > On Wed, Apr 03 2019, Ian Kent wrote: > > > On Tue, 2019-04-02 at 20:08 +0100, Al Viro wrote: > > > On Tue, Apr 02, 2019 at 06:54:01PM +0100, Al Viro wrote: > > > > static void autofs_dentry_release(struct dentry *de) > > > > { > > > > struct autofs_info *ino = autofs_dentry_ino(de); > > > > struct autofs_sb_info *sbi = autofs_sbi(de->d_sb); > > > > > > > > pr_debug("releasing %p\n", de); > > > > > > > > if (!ino) > > > > return; > > > > ... > > > > autofs_free_ino(ino); > > > > } > > > > with autofs_free_ino() being straight kfree(). Which means > > > > that the lockless case of autofs_d_manage() can run into > > > > autofs_dentry_ino(dentry) getting freed right under it. > > > > > > > > And there we do have this reachable: > > > > int autofs_expire_wait(const struct path *path, int rcu_walk) > > > > { > > > > struct dentry *dentry = path->dentry; > > > > struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); > > > > struct autofs_info *ino = autofs_dentry_ino(dentry); > > > > int status; > > > > int state; > > > > > > > > /* Block on any pending expire */ > > > > if (!(ino->flags & AUTOFS_INF_WANT_EXPIRE)) > > > > Oh yes, this is saying the dentry hasn't been selected > > for expire on the first pass, there's a second pass at > > expire selection so there's a delay there and both flags > > (this one and the expiring flag) are kept throughout the > > expire operation if dentry is selected. > > > > That might be partly why an oops has never been seen but > > path walks can occur at any time so it's a bit puzzling. > > > > LOL, and Neil probably can't remember the deeper detail > > on what he did there now either. > > It seems very likely that this was just a subtlety that I missed. > I doesn't help that "ino" isn't actually and inode and isn't freed like > an inode, but that is no excuse. I've become accustom to the naming so that doesn't occur to me, ;) > > When we add the rcu_head linkage to 'struct autofs_info', we might as > well remove the 'struct inode' from there - it doesn't seem to have been > used for years. That's a good point, I've thought about doing so several times but haven't got around to it. Ian