Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1764936rdh; Tue, 26 Sep 2023 02:57:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhPwe1pu7iuhwewF6rOF65XIK/QI3b17R08Q5w7sNl47LFNUbYbDEhyrL7hvUDiy+cjy/m X-Received: by 2002:a17:90a:348:b0:277:33b1:94dd with SMTP id 8-20020a17090a034800b0027733b194ddmr7186994pjf.38.1695722277913; Tue, 26 Sep 2023 02:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695722277; cv=none; d=google.com; s=arc-20160816; b=u56U+LS5YOLu3DJDJXY69w78/RC/ZBo5LCEU/salpTOniO64FPvGY85BP+5E1uPUG3 jiu0KYJXPdn4hU910yJBSgUJoS8v6Htw1KA9GO9YloiQz9wtCFTwXGmuh2QBwcgMIPUJ VgoXTSUKUXpmeLC4+zIaHI6SHI4o9AkFqg9CRX6CVItkn9Q/TC7fgqeJ9Xjcr/eTHq2E 6oxEuwy/G2IyxE3Lo87IfThAeyTmWjmKcvuEFL8T5nipln0EegnXSyu2iEJ0rl6mYfyv X8Mxq8IacFGWkC6WdKdoekgdDj2r0fUDnCMjThAqr7vV0XRA4bWr86NXS68bobhjuLZk S9kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=91sfX03Nq5yOSf9YtZQPHk2+AYVPCspOqbkZltG4mLI=; fh=RK7GzIFFkYY99fnIMxJOGb9qRXb72JsJsrXK5g4s5YQ=; b=f82h2eG5Ykzc19WCPru07eSBuCfeCruSoNv/qhothotbKb1RcOr7W9bE18GxuCnUTB 1TL3Ion+hI/a0KVNr9daDmYneqmbSCzk4sL6ZdRzhJqxA5FngF3F8RhYzdMhk/b9ircP ytcqSH/zh/sPm9UBSBhem8IgpbtmHmqeN6P5+Jeb+0KDOVp+P25C5NW+YVFMqgsb0WK5 UolKTqvsNrx0kZrrdDL+kArwntQK3YoPqFh5W+Fsc1ypTZtJStoOCFW0htGKh5ioujUW XfHhlCRU6/M15VlUpgLBPEFzWxtS/2kNq+G0L8d3bKfDMGGVvG1UR4zRSEZG7Lo2wnSE XPSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id om2-20020a17090b3a8200b0026d0f7c6b17si15946882pjb.30.2023.09.26.02.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 02:57:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A0F1F8080EF6; Tue, 26 Sep 2023 02:41:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233841AbjIZJlm (ORCPT + 99 others); Tue, 26 Sep 2023 05:41:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233835AbjIZJll (ORCPT ); Tue, 26 Sep 2023 05:41:41 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DAF4B3; Tue, 26 Sep 2023 02:41:35 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id DEB6468AA6; Tue, 26 Sep 2023 11:41:30 +0200 (CEST) Date: Tue, 26 Sep 2023 11:41:30 +0200 From: Christoph Hellwig To: Al Viro Cc: Christoph Hellwig , Christian Brauner , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Fenghua Yu , Reinette Chatre , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dennis Dalessandro , Tejun Heo , Trond Myklebust , Anna Schumaker , Kees Cook , Damien Le Moal , Naohiro Aota , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org, linux-hardening@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super Message-ID: <20230926094130.GC13806@lst.de> References: <20230913111013.77623-1-hch@lst.de> <20230913111013.77623-4-hch@lst.de> <20230913232712.GC800259@ZenIV> <20230914023705.GH800259@ZenIV> <20230914053843.GI800259@ZenIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230914053843.GI800259@ZenIV> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 26 Sep 2023 02:41:48 -0700 (PDT) On Thu, Sep 14, 2023 at 06:38:43AM +0100, Al Viro wrote: > It's worse - look at the rationale for 2c18a63b760a "super: wait until > we passed kill super". Basically, "don't remove from the lists > until after block device closing". IOW, we have As of this stage we don't even touch anything related to block devices.. > That was *NOT* what a recent rework had done. Block device closing had never > been inside ->put_super() - at no point since that (closing, that is) had been > introduced back in 0.97 ;-) ->put_super() predates it (0.95c+). > > The race is real, but the cause is not some kind of move of blkdev_put(). > Your 2ea6f68932f7 "fs: use the super_block as holder when mounting file > systems" is where it actually came from. > > Christoph, could you explain what the hell do we need that for? It does > create the race in question and AFAICS 2c18a63b760a (and followups trying > to plug holes in it) had been nothing but headache. Because it allows us to actually get from the bdev to the holder directly, someting we've badly neeed for a while.