Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6461990ybv; Wed, 12 Feb 2020 12:42:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxt5hhf8w4m6XAPerskVx8ZMEfmmvdqOQGFkzqq8QaOUzK6PO2StpFtUGKgT4J9u1/bSkor X-Received: by 2002:aca:2419:: with SMTP id n25mr657901oic.13.1581540169002; Wed, 12 Feb 2020 12:42:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581540168; cv=none; d=google.com; s=arc-20160816; b=y87HZVsfO8mCEI7tPmT+JvBgDCHwB4cq6/Ci8NFwUpIvOOZdx8Dazyv2+xrkW0a7f5 iMpccSEIqJUBbceaPjZwmRzkuP7rZLKfB6LTTKig4jMaimnheue+bfh9I24q0jBh86Lf D/2XjE8+2W5bV+986q1T/hk4M7hkNGe+SlEQY9iUqSLe+VAeLhq/jGvo8Rp//X+YT9Uj hTcewVu+pEaKzJUllxeFC/t2aww6ebriAFOwejLgE96AAodFEQZbX4GnooGPLw9SdqNy 1XJh1TcoK8VUQNt0aFdtYk90xJdYEyr3/ppIql0bkntz+mN50EOzRSyOxzYkyhFG5nYp aP8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=xE+KNbLYokjMY0Kx4e3H2SYWfte3HF+O/elacGWEu64=; b=hyPv8ve0A0MDfuNKeSzlwZTsVH4NKvzVCqyzB1Uf/8wunQwXIrpJ4EAqnHS30Sm98W kTgPl1TjWRT9ax8P447FJocUE6hxpEtvF4fpRMUA50ISClYBaM3jDa1asyU/YaU09Htj Ew6ytkpBwC8cKU490V+cGzLOrnih7s9QO9eXjquNBjpi9MBn383FL949MTndrjQIcUwr gkjhS5UvT7HiNUKt1uoC2UXj9comXDU3KxEmY6ndj8N3mx8MpaUtx46IPNbbLQs+k4Aq 4sQyXs1nUO/SeCglKAvoqq229E2egquMJwrFqufu0uXYlwhJnTqAtxcF/fAQlYmKwOst yCCw== ARC-Authentication-Results: i=1; mx.google.com; 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 r21si726254ota.204.2020.02.12.12.42.36; Wed, 12 Feb 2020 12:42:48 -0800 (PST) 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; 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 S1728866AbgBLUlb (ORCPT + 99 others); Wed, 12 Feb 2020 15:41:31 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:43908 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727138AbgBLUla (ORCPT ); Wed, 12 Feb 2020 15:41:30 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1yp3-00Bb9p-0J; Wed, 12 Feb 2020 20:41:25 +0000 Date: Wed, 12 Feb 2020 20:41:24 +0000 From: Al Viro To: Linus Torvalds Cc: "Eric W. Biederman" , LKML , Kernel Hardening , Linux API , Linux FS Devel , Linux Security Module , Akinobu Mita , Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Daniel Micay , Djalal Harouni , "Dmitry V . Levin" , Greg Kroah-Hartman , Ingo Molnar , "J . Bruce Fields" , Jeff Layton , Jonathan Corbet , Kees Cook , Oleg Nesterov , Solar Designer Subject: Re: [PATCH v8 07/11] proc: flush task dcache entries from all procfs instances Message-ID: <20200212204124.GR23230@ZenIV.linux.org.uk> References: <20200210150519.538333-8-gladkov.alexey@gmail.com> <87v9odlxbr.fsf@x220.int.ebiederm.org> <20200212144921.sykucj4mekcziicz@comp-core-i7-2640m-0182e6> <87tv3vkg1a.fsf@x220.int.ebiederm.org> <87v9obipk9.fsf@x220.int.ebiederm.org> <20200212200335.GO23230@ZenIV.linux.org.uk> <20200212203833.GQ23230@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200212203833.GQ23230@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 08:38:33PM +0000, Al Viro wrote: > On Wed, Feb 12, 2020 at 12:35:04PM -0800, Linus Torvalds wrote: > > On Wed, Feb 12, 2020 at 12:03 PM Al Viro wrote: > > > > > > What's to prevent racing with fs shutdown while you are doing the second part? > > > > I was thinking that only the proc_flush_task() code would do this. > > > > And that holds a ref to the vfsmount through upid->ns. > > > > So I wasn't suggesting doing this in general - just splitting up the > > implementation of d_invalidate() so that proc_flush_task_mnt() could > > delay the complex part to after having traversed the RCU-protected > > list. > > > > But hey - I missed this part of the problem originally, so maybe I'm > > just missing something else this time. Wouldn't be the first time. > > Wait, I thought the whole point of that had been to allow multiple > procfs instances for the same userns? Confused... s/userns/pidns/, sorry