From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8131DC352A4 for ; Wed, 12 Feb 2020 21:08:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FB1D217F4 for ; Wed, 12 Feb 2020 21:08:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581541727; bh=7Sd9AozWdi6ADgVh+KdvO22gRmfmYpItxhoTBdpX8UE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=K6jkR/dts9NeNO2b/LiapjekMQaaWbAinIr125E+ZA0yuV7JBfl3IuVFHAZCHa4Z4 u8PpymEpYLfiCFJH8RwonRUuuTzv6p8oxn9ZwMFELWk2XnT9XG7mIoubsYF9Vgks/N DIkhzjUFkpkOrOIzCPuWJ8WRrKLpP0Q1EsbB+7UA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729103AbgBLVIq (ORCPT ); Wed, 12 Feb 2020 16:08:46 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36444 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728098AbgBLVIq (ORCPT ); Wed, 12 Feb 2020 16:08:46 -0500 Received: by mail-lj1-f194.google.com with SMTP id r19so4025768ljg.3 for ; Wed, 12 Feb 2020 13:08:45 -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=MrcqrOfiL2TTECuCTlH/RDoklYuR2Md+yuQYxD+auZkimku/6eAlrEiXqm2kzMYFA/ lXGAJjl8hm/yHMjE4akoktRImUC6GvJ4CNKGqRpU/hLTCdDGM1OQssTy/7EP3bOLbAU3 1k17Zx6CHPC5E8thqDo5QsYTCHm6w0Qf0UfdsYspGUkfVXcLMs5ncl+sYqhFhZReZdWr 9Thu/lYYWk3IktSIsTtg5NfZ1on5i6lB+d0QLfxCbYzMiVxOirkiWNFvjFYuOTZHuURN 6vjVZXJF1R1cJCL0HoxHfrBaqb4KZZphxuCNsOhPJbN+SmAmzJNVFpes1cCcjs9Dx2Zu 2cDQ== X-Gm-Message-State: APjAAAVGKj8T1yrW5mmx1LAjBTSa8P53ShREhI06L5zME4kNT5tZ0/Am q0Xpb5FZRBKbwOoYzuMUZ52RMlfG7tY= X-Google-Smtp-Source: APXvYqxXfPev5kbYIJJPw+te3wVjpqsgS491rMHNSKPoeaAW6sRbOwLbRFe4WGPZOiyciA5TXrDurg== X-Received: by 2002:a2e:b0c4:: with SMTP id g4mr9013710ljl.83.1581541723807; Wed, 12 Feb 2020 13:08:43 -0800 (PST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id y2sm164338ljm.28.2020.02.12.13.08.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Feb 2020 13:08:43 -0800 (PST) Received: by mail-lf1-f49.google.com with SMTP id f24so2639060lfh.3 for ; Wed, 12 Feb 2020 13:08:43 -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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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