Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp6057056rwb; Tue, 1 Aug 2023 11:35:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlHf7j7mtKieETMf57d2R3zrJC/8ACrcJ+tIiIN2rRSbAXt1NlywNw2AKLP6FFJZOMQz7XIO X-Received: by 2002:a17:906:8459:b0:99b:eeeb:84a1 with SMTP id e25-20020a170906845900b0099beeeb84a1mr2995825ejy.27.1690914901785; Tue, 01 Aug 2023 11:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690914901; cv=none; d=google.com; s=arc-20160816; b=UWHu9p/oPfC6Mm906qqVdoKF4dn4XhAz9qCdhgBBA4ZvkyuQbCC26OYlJxJ+70omoY 2NSu2D0P/hyyi8Xol+9jZ2cuNUkjQWjyb6o5lp8koQ8RWOgR2wh2vdpB3BUr+ohiNy4k aKOItsz+Ua3RNvBqC8yDZqbmDRNN/kovnZavxZHL7quTUHVNYXl5MdSfylRzvvXUySCY 2ekprRS2uuJGum65Ills3FRIAWSpdB0AEsqF2F+9hh2AFcZ5m1gOzkr9deu5ymsz3Mxr RxsxJjEWmlC0i6zW/h4bpp2JkDbEOZ//3xLU1UgnZquWZAZCPY0Fr6RnZxCz1Wy0fK+P wujA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XlwSl0KJ11sjJgplqG1VOMn72Ax8pkSOEXXg7F7nV9c=; fh=K/fDz/i5AHe4Sp1HKC1x+PHam7TfL5ofnSaqAi3dvKA=; b=A8LoI4P3+6sfVkM/pkFOd/do6mGHVrurlsUCppazzdl0r+zqHKSlmwL9h/vXUZEBfV 5ipcPCz1WEddfnmcx/qM3drR8CiTLv+8nvrQMrqr+uH7DZr/xo/9xj+40TQFE1yeWK/T dTd3CGI6iD2fOGTIo4dnwoN7MzbiSSgV2/5lYKv04uFk5RkCNDJ/Ljnd6WwsiFcoJh0O Wwulpl+UPjsfuBhZGTKsHjwELw7l+lfBg6EbKB+40AFYa3YU1YkRHDQWBkC6galNu6zG I02VPxFi+e2BL+1Iz4+nMcNF4gs9s+hFXBkpQIsgYQeYClvcAsAtKHGCFkC2UIq6+hS7 8IRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=1+EjHCZS; 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 jo13-20020a170906f6cd00b00991c8af7ba5si9388903ejb.473.2023.08.01.11.34.34; Tue, 01 Aug 2023 11:35:01 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=1+EjHCZS; 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 S233767AbjHAP00 (ORCPT + 99 others); Tue, 1 Aug 2023 11:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbjHAP0Y (ORCPT ); Tue, 1 Aug 2023 11:26:24 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AA0B2683; Tue, 1 Aug 2023 08:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XlwSl0KJ11sjJgplqG1VOMn72Ax8pkSOEXXg7F7nV9c=; b=1+EjHCZSdNt7AQcbUEB+fPS3is H9Jy3H0jo4moONZrFHW3pHDrTib81y8wbuiQjkLzd8Y8WbhRIBbQbYQEo4YnnJA21xC6+RC75Axbl q3t1uWqJtQ0iz0tPRCeoN1b/IG30UeHLksQQtWmS6An9XQ6A/+Y1xSvxvBtb0OW8ftsYIaXslMvy+ quEpNsPJknNaImNWEsCOPuPK5yqRTHSzbAmwt3gFeKQYh4/oYS1J3zREXUFhQd2991AbagvQEy9Kz Bcqs0/M6i4D76bFhpDSArFOHFbc6j2mFiOD3MrepOeFAy/MycJy7uY3clupfgmVOSQP4NRLKnJFtX HtQRT5kQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qQrGC-002ing-0W; Tue, 01 Aug 2023 15:26:08 +0000 Date: Tue, 1 Aug 2023 08:26:08 -0700 From: Christoph Hellwig To: Qu Wenruo Cc: Christoph Hellwig , Christoph Hellwig , syzbot , clm@fb.com, dsterba@suse.com, johannes.thumshirn@wdc.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [btrfs?] kernel BUG in prepare_to_merge Message-ID: References: <000000000000a3d67705ff730522@google.com> <000000000000f2ca8f0601bef9ca@google.com> <20230731073707.GA31980@lst.de> <358fab94-4eaa-4977-dd69-fc39810f18e0@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 In the meantime I've also reproduced it with just "btrfs: fix the btrfs_get_global_root return value", but it took a rather long time. After wading through the code my suspicion is that before this fix the ERR_PTR return made that for those cases btrfs_get_root_ref and btrfs_get_fs_root_commit_root don't actually do the btrfs_lookup_fs_root. Although that seemed unintentional as far as I can tell it might have prevented some additional problems with whatever syzcaller is fuzzing here. Not sure if anyone who knows this code has any good idea where to start looking?