Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6478922ybv; Wed, 12 Feb 2020 13:05:06 -0800 (PST) X-Google-Smtp-Source: APXvYqyYsFxKU/f09KnAdcbBZ+9X77UpWko6qXqNEhZ444fddo7glQdz4b60A6hjVW8h6WL4nBYp X-Received: by 2002:a9d:6418:: with SMTP id h24mr10823633otl.172.1581541506678; Wed, 12 Feb 2020 13:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581541506; cv=none; d=google.com; s=arc-20160816; b=XixApdybAJ+qHlqewW4NISTL2dO4NAr5MyGvbPGZSFSHu6Jcd8C56TEij9fAZkDrs2 xVsOq3taaPcnbMb67XCexomlF6MJKF35EhHQKMt7q6XNF2BldnBzoHqmBZkBOq+XtmnY B3IkK035ERD5bVjLxLRJ6kTxx2UzL2mq9m4W0YQOVRrdBEjeHMHmY1SFctPgMFySbtEM BO50rbzFgnCd/FMdvAD1ybBs3hXiTrFX3GE+ed6y/TeWAUs792QIfFKLUACTcscQSz7Y KaMf6EIoMnz4Fh/RkQhohkW67etC1bzpqzjx7ly2UWTsoorKBFNXibzeijUuGgDKI9DL Es7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WySKsoF25f/J4EpIF80nlYeN07mmY9MX1gph6T2llNA=; b=gymdyvIApX6AMPJdxQdZgiDLRwhCpP+dxi3ak6aacG/JtWGL3KpH6t/GDWTQHbCMLk B6eQq3mAN6mZU2GCDQmT8/z3LwPSFw+weftT28fYh61/zMcm40zegb8IJgl7uJ7xjgf+ 9PBKbWpVU50dvvXBS1qmyhIPNZxUPyeZnfD5JqdvCeEuUjVKfSxExfaiLtrYgvPTWPxC m5zZlmMdDTHh8HD8c4z2US2zgmi9pi1798m/0Ko3y5djcpyWvwhTHHlPaSnlvGD+z/ez miDt9M5GQo8SjLf6+S3NX6Xvt9oANSFvHIE5TjP2iNW928cVR3u1YcAKOxWdzpHKxNVT zv9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Q58W0NiV; 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 w5si1346otm.45.2020.02.12.13.04.44; Wed, 12 Feb 2020 13:05:06 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Q58W0NiV; 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 S1728603AbgBLVDD (ORCPT + 99 others); Wed, 12 Feb 2020 16:03:03 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34399 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727138AbgBLVDC (ORCPT ); Wed, 12 Feb 2020 16:03:02 -0500 Received: by mail-lj1-f195.google.com with SMTP id x7so4012935ljc.1 for ; Wed, 12 Feb 2020 13:03:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WySKsoF25f/J4EpIF80nlYeN07mmY9MX1gph6T2llNA=; b=Q58W0NiVVgTX+oNnbx2yak8H3LqZJhOMXKR6Ng/loJu7bqEx0qJqJdUgYoD/Insl5V 0bdfWlwpi7ZWdHerxvV1fP32PeO3Q+Sr+beCxumaLAw59xU5UE6TavPtsaLJeIdwxKCP /m8KW47+oG3MYjz8Wo+heg9mc0RztoSq3bL84= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WySKsoF25f/J4EpIF80nlYeN07mmY9MX1gph6T2llNA=; b=bkZpF9YN+CqdlVNN23n+glQvC5Jn2zU2KI6KIDCGrMWZPiSG2McnpbX+JjXlRJQeiS z2uApAUrmPHnr9EluV9Td6M9y0na42KbhE94X6yHVE9VUDT4chraSgF0pnCjWPHE5hiI yng2JXsoNwukCi9/uGLbZxoN505QW37HSV9yULiNruijgYT+Pmf21GHtEbybeoopBSNc 8RvASLrlXrTk6XBnBJ7aIrW1MuqO8Elhfmc09uWHm/pSYOfEqE0CJTwB84ss+RlAPNmX z/3dGUvABpJTryOJ+9fwjir0eKgBDB02iZWRBqQpG91t9cE71TYdhSMnA8WqdgC9Yj83 +Xtw== X-Gm-Message-State: APjAAAXsSbjLD5wzbhFOaJkNpXECRytdOUNIlHRfWRTOeVpNikwfRNca xOtQBspK2DKTTwqZj+L58ri1xUqDR5Q= X-Received: by 2002:a05:651c:111a:: with SMTP id d26mr8803173ljo.153.1581541379313; Wed, 12 Feb 2020 13:02:59 -0800 (PST) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id p9sm152018ljg.55.2020.02.12.13.02.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Feb 2020 13:02:57 -0800 (PST) Received: by mail-lj1-f171.google.com with SMTP id d10so3988272ljl.9 for ; Wed, 12 Feb 2020 13:02:57 -0800 (PST) X-Received: by 2002:a2e:97cc:: with SMTP id m12mr8729073ljj.241.1581541376733; Wed, 12 Feb 2020 13:02:56 -0800 (PST) MIME-Version: 1.0 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> <20200212204124.GR23230@ZenIV.linux.org.uk> In-Reply-To: <20200212204124.GR23230@ZenIV.linux.org.uk> From: Linus Torvalds Date: Wed, 12 Feb 2020 13:02:40 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 07/11] proc: flush task dcache entries from all procfs instances To: Al Viro 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 Content-Type: text/plain; charset="UTF-8" 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:41 PM Al Viro wrote: > > On Wed, Feb 12, 2020 at 08:38:33PM +0000, Al Viro wrote: > > > > Wait, I thought the whole point of that had been to allow multiple > > procfs instances for the same userns? Confused... > > s/userns/pidns/, sorry Right, but we still hold the ref to it here... [ Looks more ] Oooh. No we don't. Exactly because we don't hold the lock, only the rcu lifetime, the ref can go away from under us. I see what your concern is. Ouch, this is more painful than I expected - the code flow looked so simple. I really wanted to avoid a new lock during process shutdown, because that has always been somewhat painful. Linus