Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6459269ybv; Wed, 12 Feb 2020 12:38:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxhcd22bWWMIMeCgGrNdwYgsoNf+qeC5dXeeG9gnH3DVMvqJIzvsmtiQln/1O8IJyvnKaTc X-Received: by 2002:a05:6808:249:: with SMTP id m9mr654068oie.5.1581539937112; Wed, 12 Feb 2020 12:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581539937; cv=none; d=google.com; s=arc-20160816; b=MNGA8pOdCg6DkL31HMWoYOHGmLSnl2/yzpxwWyRHPfGkEjF7arXbhmJo3xZnCNigoD FDO7sjiZIquVzKJ+Nj3tinA72Zzwkex2lyj/fKOkexKpdKvdKaVsGN7bspoRPTqkVN+g AiSq5bZBQ/6sNJflkPguDfd8Qq9ob6YlfG4l3rrwtZgQtFOOXehc/1wyvF6FkT6gDQ4O 1Ow+5+J7a3yL9JvYE/W9CdrM3BQADCASlytOTFxiaB4sFrN7smmMW2IVEWPPB9b+8JLP kiRGpLKXW372WEoeDaFACy/6KFJgHEvpSPlFN2mbmlYuIhth+UA/8GlgbmzQ3LXcFOCN rqxg== 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=92QGKAQ4dWt/qTpCsoZqZ6BOhv/+Md8dPzzVS0mg7jI=; b=NgOme7ByzOqcDXkVNHPbKlw9JXMO+eYA6SXk0lt8oDZHR2rbmqJZYelEnDMbcKtads ly51Gi7t/dS0/ZEcK4XyTXFJcseXdvvdIjJfdYy6HlZwLIkhErw5QOd11W5UVAM8UQgY Mvl+vyZQ6/GPZQL32Cdp3uw27hVIcyt4GrpCIFDoCQUS1Yvm2JEABIyBNI+XeALiNaYy T8ojcSIIsNd3FNTt9d7I+1OL0t56/+jtg79gTXZ9DfjBl9CtiG0Su+zYpzH7cu1MaBrA K5b7ML53vhukfec9qq6I7ncq3R2FfAuQ1NEuR7e7HVe6PswQh7uiqI0jdlVtE+3ng1xH 5x0g== 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 m26si794398otn.307.2020.02.12.12.38.44; Wed, 12 Feb 2020 12:38:57 -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 S1728767AbgBLUil (ORCPT + 99 others); Wed, 12 Feb 2020 15:38:41 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:43838 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727692AbgBLUik (ORCPT ); Wed, 12 Feb 2020 15:38:40 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1ymH-00BamE-5t; Wed, 12 Feb 2020 20:38:33 +0000 Date: Wed, 12 Feb 2020 20:38:33 +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: <20200212203833.GQ23230@ZenIV.linux.org.uk> References: <20200210150519.538333-1-gladkov.alexey@gmail.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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...