Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1752714pxb; Fri, 18 Feb 2022 14:50:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwK4fCnxo1ekAg1uIIfsWkgnhC185zA51NF/HJvpSLR+jQo5WoTBj+w8vW8bdhjSayHdltC X-Received: by 2002:a17:902:be0a:b0:14d:5db0:7a14 with SMTP id r10-20020a170902be0a00b0014d5db07a14mr9210090pls.155.1645224624955; Fri, 18 Feb 2022 14:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645224624; cv=none; d=google.com; s=arc-20160816; b=NPzXqz2/ExWFOQx9semscNKqDHfb+HiWR6IjSk0IwRxn9JJMTJ/yXrDKBUMVxA0sDM 7RkH+SawrZQFRACWHCGzxInoJ6cr3Wz+OdLLR9LeDuTk1hFX7IoOX/HiXJ7IGBlYySLc KHavPUPcaxuaoRJD6quGDeLhBRSiuuTHlJX8xQapqdQDpoUDffnXn5wyIWm6ZjTs98aX 0ah+OzEborewUdGEuSptwRdf1ufTam5Iq2RzB1RPw0e6KUc1NqgTIRk/7pWNtu7pIud4 qp0agSyG2UyuSXy86yFp34lfYu/g4Z0LRCM+dQ4MmqEofTNYQfiWpNO+/J+K7I8SG3CX ntwg== 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=+As8fvsfSfPfrPBYmd/ploFFMaR+qXy+a4eX1apVMxA=; b=y/9tJkoEWUGsBrf3iuSiGrvT+vJ96DcJ81krfiEI+BHTDP70k57mwvf76YScs76fSG eDGVPEdS4a7LBAoa76t1M8KIoMOohkAcdxtqnqdmT934ik4DpeL1qnKniNiwjax8trC3 zLMgRdL2ysoM/2RoS4Pm1fdo4b2kbtfyNG9KOcFyfQdQcEjkb3sJSvmXGfRN9dNCgnxW 4w418SckWvhfH/mvaNzzHEYzMbUmmzlERfey79wRDv0U4HV9+Y9cEpXoTNYjs1ibW4mU PYBVV+bUqtGNNbd6uirprskffKkJPAXwGssp42a285YLorHI1PUtpZRNujinnRr3SKoQ V3sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 69si9865031pge.436.2022.02.18.14.50.07; Fri, 18 Feb 2022 14:50:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237020AbiBRT04 (ORCPT + 99 others); Fri, 18 Feb 2022 14:26:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236908AbiBRT0y (ORCPT ); Fri, 18 Feb 2022 14:26:54 -0500 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDD9D34B9C; Fri, 18 Feb 2022 11:26:35 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nL8tm-002o7t-7v; Fri, 18 Feb 2022 19:26:34 +0000 Date: Fri, 18 Feb 2022 19:26:34 +0000 From: Al Viro To: Rik van Riel Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, linux-fsdevel@vger.kernel.org, paulmck@kernel.org, gscrivan@redhat.com, Eric Biederman , Chris Mason Subject: Re: [PATCH 1/2] vfs: free vfsmount through rcu work from kern_unmount Message-ID: References: <20220218183114.2867528-1-riel@surriel.com> <20220218183114.2867528-2-riel@surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220218183114.2867528-2-riel@surriel.com> Sender: Al Viro X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 18, 2022 at 01:31:13PM -0500, Rik van Riel wrote: > After kern_unmount returns, callers can no longer access the > vfsmount structure. However, the vfsmount structure does need > to be kept around until the end of the RCU grace period, to > make sure other accesses have all gone away too. > > This can be accomplished by either gating each kern_unmount > on synchronize_rcu (the comment in the code says it all), or > by deferring the freeing until the next grace period, where > it needs to be handled in a workqueue due to the locking in > mntput_no_expire(). NAK. There's code that relies upon kern_unmount() being synchronous. That's precisely the reason why MNT_INTERNAL is treated that way in mntput_no_expire().