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 70452C83F2F for ; Thu, 31 Aug 2023 06:31:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245148AbjHaGbV (ORCPT ); Thu, 31 Aug 2023 02:31:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232908AbjHaGbU (ORCPT ); Thu, 31 Aug 2023 02:31:20 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48F32A4; Wed, 30 Aug 2023 23:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=x7jecP7KFnSNkO2DSlLMkbDbDAg7iq2vacoSweuUVPc=; b=cVawuss1wNIoGZOcmN5C7meYKF Vy/kJWEd5OD5HtcqD5T2XqYl4Fu7WSBl/JvhwO6onCzavlF4hgvO+lJ/RBKNOA04cP/J6c3GXp/qv MWarK/P/RwpPZkPbV8mufXhmeVUEb45//PNdFCnFMB81GGV+YFf7JwBeo7lZf9+wPjcnNxjgJ68b+ NyjAoZsBRBNcegK/KVhNZhvhwMMyZ6nYXbApok/wChR5rIktiYBlA/FwMHdhtQqj74X0fpCy2+m/L 7Vic6kGymDoa8x2qdIArpOB782pBILazZq0wRwby7lrPMhIUsmvS9HFfU/vvU/S1nQGRhDB1RqIHs 77n9Vp2A==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qbbCu-002GyT-2b; Thu, 31 Aug 2023 06:31:08 +0000 Date: Thu, 31 Aug 2023 07:31:08 +0100 From: Al Viro To: Christoph Hellwig Cc: Christian Brauner , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Paul Moore , Stephen Smalley , Eric Paris , linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, selinux@vger.kernel.org Subject: Re: [PATCH 2/4] devpts: free sb->s_fs_info after shutting down the super block Message-ID: <20230831063108.GE3390869@ZenIV> References: <20230831053157.256319-1-hch@lst.de> <20230831053157.256319-3-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230831053157.256319-3-hch@lst.de> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Aug 31, 2023 at 07:31:55AM +0200, Christoph Hellwig wrote: > sb->s_fs_info can only be safely freed after generic_shutdown_super was > called and all access to the super_block has stopped. Similar to ramfs case; nothing in dentry/inode eviction codepaths is using anything in ->s_fs_info. And references in tty are holding an active ref to superblock in question, preventing ->kill_sb(), so nothing from the outside is going to play with e.g. devpts_{new,kill}_index() under us.