Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9356346rwd; Wed, 21 Jun 2023 06:31:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6O3lwjn6jwpP8ealBweL7xJ++mobdQ22Wv14EVYeFgzYSR0jTeZYtkf8MPIs7cS+ERgV+x X-Received: by 2002:a05:6870:8c0e:b0:1ac:e870:98e8 with SMTP id ec14-20020a0568708c0e00b001ace87098e8mr4229102oab.35.1687354266862; Wed, 21 Jun 2023 06:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687354266; cv=none; d=google.com; s=arc-20160816; b=WG8Uz5a5OIk0mzXWoKXpL1ZlWBkev26G+UqhESD2nIBnQZUxtmDxviq7h4QBAd5cT2 gvhutDccx7PFYKmsS2t5mKdLMzqFV/8OIFvVW2eqxtWIyM4H+Lxr8nEDz2/oTQtgGcna odnEtzE5Yz4EQ9aR0Wiu6f89O4rSC3Fq9p12Ot9vavdrOIXFWEihJLhjgvV9Cj7mNb/c FCzyruNza1U+fvATmTCJOjHWV5nr0SvPdaVw/g9oFFR4IJl4t2CDKQo2vupW21GPxIAt CIT0wGdzriVRV4xXL79emeZd31gdj16MVHHitMauLMCYNLDeVmZ3bbzh/0mlU/A/AMEe bZTg== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=fFl+TwM20LVAi4D/M42g+0o8Juj67CDLcdDgvpi5mGk=; b=cppoRO8YVpfRXTrZ4+IJP+vdDvYCW0uDH8PZA0boW1PMtX7UlPqTrhAzKY4aE+5XGs 1RiDPJQRxRTOnrMrBT030eUTfa6flf5gTOigGLnd+1YWCXAu+KzvZRkTOo0dD5wlPyGz AqAoLOKUJBuy5ouhgL0mxNOtE3XWYKwSREHD6J+JoGi1wzs7of348eY9ga9/RYcPERWJ 12CFTcaMBG6HcLLHCi9hfSEBy8koq/0LMMCeaG29oowghoWYwsnzdyNv/x/IrIDMuMbk cctDXVzQdXiyOCaVuUXI2T2hB7WRcmQgx2XgIucO9CYBiZDABgWeyyDPdWKgARHMaw2x W0bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=2FPVqnge; dkim=neutral (no key) header.i=@suse.cz header.b=D+LeytsQ; 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 rj6-20020a17090b3e8600b00260f28b14e4si1850551pjb.4.2023.06.21.06.30.53; Wed, 21 Jun 2023 06:31:06 -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=@suse.cz header.s=susede2_rsa header.b=2FPVqnge; dkim=neutral (no key) header.i=@suse.cz header.b=D+LeytsQ; 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 S232029AbjFUMkV (ORCPT + 99 others); Wed, 21 Jun 2023 08:40:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbjFUMkQ (ORCPT ); Wed, 21 Jun 2023 08:40:16 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9578B9B; Wed, 21 Jun 2023 05:40:15 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3BFCC21C99; Wed, 21 Jun 2023 12:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1687351214; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fFl+TwM20LVAi4D/M42g+0o8Juj67CDLcdDgvpi5mGk=; b=2FPVqngejQ6nbFfhWhapGLmZpDHw6BVy8/mlH5YZ5kpptEdS0oRwhJuBfnnpkuZpbv1uOm L9oZmWHbuzhc1ihKKk2l5VkbYnj2nbdJggbx7yrGbWNBVPHvGgv+ZUf6OhBgIOzL106MxH 9BeTN2dUokYmMBAI0GWR5BlMqx8BwJY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1687351214; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fFl+TwM20LVAi4D/M42g+0o8Juj67CDLcdDgvpi5mGk=; b=D+LeytsQ+1KY5k+wYxnYApJQ9IVKTvtEW3lRs8hBUhQOSs5GBZLYb6vs2ZhA2/oVZQSIOb BB6KwNEjAz36kBAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1152D133E6; Wed, 21 Jun 2023 12:40:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1kRSA67vkmRpUAAAMHmgww (envelope-from ); Wed, 21 Jun 2023 12:40:14 +0000 Date: Wed, 21 Jun 2023 14:33:50 +0200 From: David Sterba To: syzbot Cc: clm@fb.com, dsterba@suse.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?] WARNING in emit_fiemap_extent Message-ID: <20230621123350.GP16168@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <00000000000091164305fe966bdd@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00000000000091164305fe966bdd@google.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SORTED_RECIPS, SPF_HELO_NONE,SPF_PASS,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 On Tue, Jun 20, 2023 at 02:34:46PM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 40f71e7cd3c6 Merge tag 'net-6.4-rc7' of git://git.kernel.o.. > git tree: upstream > console+strace: https://syzkaller.appspot.com/x/log.txt?x=166d2acf280000 > kernel config: https://syzkaller.appspot.com/x/.config?x=7ff8f87c7ab0e04e > dashboard link: https://syzkaller.appspot.com/bug?extid=9992306148b06272f3bb > compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10c65e87280000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1094a78b280000 > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/2dc89d5fee38/disk-40f71e7c.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/0ced5a475218/vmlinux-40f71e7c.xz > kernel image: https://storage.googleapis.com/syzbot-assets/d543a4f69684/bzImage-40f71e7c.xz > mounted in repro: https://storage.googleapis.com/syzbot-assets/7cde8d2312ae/mount_0.gz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+9992306148b06272f3bb@syzkaller.appspotmail.com > > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 5351 at fs/btrfs/extent_io.c:2824 emit_fiemap_extent+0xee/0x410 2804 static int emit_fiemap_extent(struct fiemap_extent_info *fieinfo, 2805 struct fiemap_cache *cache, 2806 u64 offset, u64 phys, u64 len, u32 flags) 2807 { 2808 int ret = 0; 2809 2810 /* Set at the end of extent_fiemap(). */ 2811 ASSERT((flags & FIEMAP_EXTENT_LAST) == 0); 2812 2813 if (!cache->cached) 2814 goto assign; 2815 2816 /* 2817 * Sanity check, extent_fiemap() should have ensured that new 2818 * fiemap extent won't overlap with cached one. 2819 * Not recoverable. 2820 * 2821 * NOTE: Physical address can overlap, due to compression 2822 */ 2823 if (cache->offset + cache->len > offset) { 2824 WARN_ON(1); 2825 return -EINVAL; 2826 } Either we can drop the warning as the error is handled, or there was another issue that was supposed to be caught earlier.