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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5940DC433F5 for ; Fri, 18 Feb 2022 19:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237422AbiBRTd7 (ORCPT ); Fri, 18 Feb 2022 14:33:59 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237370AbiBRTd4 (ORCPT ); Fri, 18 Feb 2022 14:33:56 -0500 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C400E488B5; Fri, 18 Feb 2022 11:33:39 -0800 (PST) Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nL90W-0002bz-3p; Fri, 18 Feb 2022 14:33:32 -0500 Message-ID: <5f442a7770fe4ac06b2837e4f937d559f5d17b8b.camel@surriel.com> Subject: Re: [PATCH 1/2] vfs: free vfsmount through rcu work from kern_unmount From: Rik van Riel To: Al Viro 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 Date: Fri, 18 Feb 2022 14:33:31 -0500 In-Reply-To: References: <20220218183114.2867528-1-riel@surriel.com> <20220218183114.2867528-2-riel@surriel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-Ao7FGBNHr2axvfjFUaOf" User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-Ao7FGBNHr2axvfjFUaOf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2022-02-18 at 19:26 +0000, Al Viro wrote: > 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. > >=20 > > 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(). >=20 > NAK.=C2=A0 There's code that relies upon kern_unmount() being > synchronous.=C2=A0 That's precisely the reason why MNT_INTERNAL > is treated that way in mntput_no_expire(). Fair enough. Should I make a kern_unmount_rcu() version that gets called just from mq_put_mnt()? --=20 All Rights Reversed. --=-Ao7FGBNHr2axvfjFUaOf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmIP9IsACgkQznnekoTE 3oPmxAf+MkEtjsaDtYZLtaUJPlK7ILJICC0WJttdjamuAw9nKTs5lVIl5o83pg1R mwY0aAhOzpNPeblu5IHvlnGpxikh6SgMIg1csJfHspkHb2NkvNdNz+KjhUtq3aZ2 LF4I6bZIICT4JZFMETEbrCxdhdV5DLwPSG6DkUSElP7cLfL/GUNbFNgeEymajyqn 5Rjct78T8OS+qAYImM8qy0a+whz+eR+hb6w5SD+APCGZhTPdcU4Kdr4LqOe1m5lm gd49jDn4Uxzb82F4tnVNlgHUquYKbg3tMpPQVHx3hfm/RlSvZomDuUck21dh0u3T oTPuAsCyEN/2The+nwuh/6Qc6i5hdw== =/XIM -----END PGP SIGNATURE----- --=-Ao7FGBNHr2axvfjFUaOf--