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 C743EC001DC for ; Mon, 31 Jul 2023 11:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231878AbjGaLQ3 (ORCPT ); Mon, 31 Jul 2023 07:16:29 -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) 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.