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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4ED92C001DC for ; Mon, 31 Jul 2023 11:16:37 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RDwfq6YpDz301V for ; Mon, 31 Jul 2023 21:16:35 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lst.de (client-ip=213.95.11.211; helo=verein.lst.de; envelope-from=hch@lst.de; receiver=lists.ozlabs.org) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4RDwfh4gvCz2yDR for ; Mon, 31 Jul 2023 21:16:27 +1000 (AEST) 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 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-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: brauner@kernel.org, jack@suse.cz, syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org, linkinjeon@kernel.org, linux-fsdevel@vger.kernel.org, huyue2@coolpad.com, syzbot , sj1557.seo@samsung.com, linux-erofs@lists.ozlabs.org, Christoph Hellwig Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" 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. 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 915CDC001DF for ; Mon, 31 Jul 2023 11:16:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231147AbjGaLQ2 (ORCPT ); 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) Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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.