Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4278784rwb; Mon, 31 Jul 2023 04:41:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlHKhmwKwcUBjSSQwGeALOuFqLi/zemqi4XnUisg/KC67Mnu8g6KOyDPwvTLRfoIkwwV5dHJ X-Received: by 2002:a05:6a00:35cf:b0:67c:db:c2f4 with SMTP id dc15-20020a056a0035cf00b0067c00dbc2f4mr11780420pfb.4.1690803704130; Mon, 31 Jul 2023 04:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690803704; cv=none; d=google.com; s=arc-20160816; b=wN/qLx3izYSWowyRgNOi5tKlhULDZ8YZW4+UqUiG3OxZDo2ghD73oAW/qnBB2204gO IDuMY7SPjxwKCcQv4xUATl/BhcpkYPNfGC94LPzPQfMw/UI6v0UH6iuTqV+JZWU4hQS6 aQIopGRu+TYNbWpDlkCJAmQfTzylRivB/ro5p6+z3i6scfM5Rq2qXWlViUV7IstugAB6 EMDOuh1+McK7HfEUiMZRskn6PLZHDeeMPRFgkhxe5V2lXQ1mIFVDbW1e6aPe7JXnIQp6 EleCKJDD9KciP5PXVjOlq3ooCneXGc3q6GnVwuAU8SPpvHra1wV2nnrvpovhfogZ/ovZ dqmw== 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=d/dB1ZR/Nr5kId11XfwVYdQLMfL38E77ZSCDIlS1uz4=; fh=WmJP+sn+yf0cbl2ZOE/ZRbE6Ozn8hoPM7JK2q3occt8=; b=F+azDwGLYsOEZaXNQCaONOyTvYwwekfhs+afQZrP1ejMuwzufpPeSyIPvTXxqL1yX5 qcTSFHsaPZrA9hZGY2LvPhEB5KKue0JS9UQ29XT5vprAPoKgveRJQ6VEuJHQvtBBte2p 0vuiSTP7sqNP/P6oW6TaxezlO8htJKB0jArRdviay/NgNaKWLBgrKIBVZQPc5WLyEfwx d7YGtXT1j4YzahniLA2/kT2+me1J2fdtxxH1DtKZXFn7bqrYzGA1XWYRbFw0rvhkimnU yoFx+yS//hSSLimRccedZr/HIN0nYtHhH1dC1BcNHO0iEqoWK2UTGI+hfLRZMp9tCuO+ BRmw== 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 z4-20020aa78884000000b00679cdcafec1si3557783pfe.109.2023.07.31.04.41.31; Mon, 31 Jul 2023 04:41:44 -0700 (PDT) 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 S231748AbjGaLQ2 (ORCPT + 99 others); Mon, 31 Jul 2023 07:16:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230260AbjGaLQ1 (ORCPT ); Mon, 31 Jul 2023 07:16:27 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6600E55; Mon, 31 Jul 2023 04:16:26 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id A42B067373; Mon, 31 Jul 2023 13:16:22 +0200 (CEST) Date: Mon, 31 Jul 2023 13:16:22 +0200 From: Christoph Hellwig To: Gao Xiang Cc: Christoph Hellwig , syzbot , brauner@kernel.org, chao@kernel.org, huyue2@coolpad.com, jack@suse.cz, jefflexu@linux.alibaba.com, linkinjeon@kernel.org, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, sj1557.seo@samsung.com, syzkaller-bugs@googlegroups.com, xiang@kernel.org Subject: Re: [syzbot] [erofs?] [fat?] WARNING in erofs_kill_sb Message-ID: <20230731111622.GA3511@lst.de> References: <000000000000f43cab0601c3c902@google.com> <20230731093744.GA1788@lst.de> <9b57e5f7-62b6-fd65-4dac-a71c9dc08abc@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9b57e5f7-62b6-fd65-4dac-a71c9dc08abc@linux.alibaba.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 Mon, Jul 31, 2023 at 06:58:14PM +0800, Gao Xiang wrote: > Previously, deactivate_locked_super() or .kill_sb() will only be > called after fill_super is called, and .s_magic will be set at > the very beginning of erofs_fc_fill_super(). > > After ("fs: open block device after superblock creation"), such > convension is changed now. Yet at a quick glance, > > WARN_ON(sb->s_magic != EROFS_SUPER_MAGIC); > > in erofs_kill_sb() can be removed since deactivate_locked_super() > will also be called if setup_bdev_super() is falled. I'd suggest > that removing this WARN_ON() in the related commit, or as > a following commit of the related branch of the pull request if > possible. Agreed. I wonder if we should really call into ->kill_sb before calling into fill_super, but I need to carefull look into the details.