Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2379777rdf; Mon, 6 Nov 2023 12:20:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWqKV+I3uRTpTZ0MZCLbJeEKYyIRWdGWCgkDdmJySLBaDW5x1efH9CspsEDrzPMDMi3igO X-Received: by 2002:a17:902:d581:b0:1cc:32ce:bd9 with SMTP id k1-20020a170902d58100b001cc32ce0bd9mr27287152plh.69.1699302052505; Mon, 06 Nov 2023 12:20:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699302052; cv=none; d=google.com; s=arc-20160816; b=E3siDYAJ0LPdE+MTIcm/f5MNMB23xukj3/U96O4Kqo/Od/1fmQjRVvHBlHFxEQCQS9 7AF4McYoA3UrRPEC30a7aiF2jkrzvr3k8DbwSEiVsxbcer80fJx35mdHOgBd+FvOUGGs qr2YQF0kdZ4v+6yj1nmVOe7DWPcWzkGz9A5z0tYJw/LFo0iTsT5infd/pXr3+q6NZNgv ptqLnqvoiXQyKMEE1/C/Dicq4S0p8PiKpByuVScJQ9R3Clkibx5XR8+V1CCyeCG4L6sz LBzZPy1vl+2sipF4ef4mjxw8y0P6mtS4iMh+cTZVQFOoCDF95hiTn6WY/XiZ9pFLjfXB q92w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=d2pmBBr8L6zR65TRDPuUySCiKF1ScSaZEPeBQYX/Rks=; fh=j5/9Nq1ogEacFQOy+Qk0FaM23wyM6TIkBEdnLCTm2xk=; b=WtEXsZ9XbpJ32WhrtjWNq+sO1fbkW4MACpHtedb3thkHjLjk8kzhnpvI4s9YugFD9C J+lJ3JKllhDk275UV4dAq89i6blyTP3+r0NE6hbqlyFNoxTaPsYTCTgtB661loF9/PP6 AT1cdbnjevLxf3zgt0XmwvJkoCRqcRIfhZtGVBoZefiI84YUapEooEwVioDKw54Hyk+I O5L39STnxNZCLbuVQGrdMO7l2izemFmtNnhWYBy8pCC0NNNXwD1EPD1H1JCJHeVBeA9P 9W6E2o1XY6wZ5YbzCwBFAN/Q4PnLkpmSbsJ8J0CCKqXUiXP2v1Rny5voty9rvrPWhiP3 7W0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mJWrTK88; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u10-20020a170903304a00b001c62e2ce6a7si8294214pla.445.2023.11.06.12.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 12:20:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mJWrTK88; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 29D138032A26; Mon, 6 Nov 2023 12:20:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232001AbjKFUUU (ORCPT + 99 others); Mon, 6 Nov 2023 15:20:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbjKFUUR (ORCPT ); Mon, 6 Nov 2023 15:20:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63A20D75; Mon, 6 Nov 2023 12:20:14 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CDBAC433C8; Mon, 6 Nov 2023 20:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699302014; bh=ekujjvi8RS42//7/8F4SRHBAC5/p/7Prwv5G3MrhLrQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mJWrTK887hpU3DCPmEEplv5u2zbVfH05jpyFTqRoJrfAUC5w9AGNpvfT52YrsolZs Wscxx/a/dBa45B53uLMeAOMR9UxFYciNL/LRLcfe2RWm+iKBr80a/xBLP81wxbDsEq vQQKhvYc0HA5NqxRvmgm1L8BODTXS8anvgQyE6KPIX2cILDTtAP6uBpdOSaHZr2Xgs 7Q5rput9GqfNiSFWC9LAy4Z9EgKMWFTpeW+F1rQQbNoacfDmAuBYx5JQByN/Xcal58 gtdEMFtuqP7J9wFGSR3GugIAOt4GWy6J/MbhevBcwG86bAjoxE574pQBFZt9OqUh6X jXo2+Pj73ZdkQ== Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-9e1fb7faa9dso28284566b.2; Mon, 06 Nov 2023 12:20:13 -0800 (PST) X-Gm-Message-State: AOJu0YxaJvMTEr5j4iIv87QSekyAduROougKgbksb1xX+b3vWZihDOAQ f9oYAII2iwuUxzBQlQRwtP8N7ulROGcn5ihmgIQ= X-Received: by 2002:a17:907:7255:b0:9c3:8242:e665 with SMTP id ds21-20020a170907725500b009c38242e665mr14289406ejc.8.1699302012434; Mon, 06 Nov 2023 12:20:12 -0800 (PST) MIME-Version: 1.0 References: <00000000000004769106097f9a34@google.com> In-Reply-To: <00000000000004769106097f9a34@google.com> From: Filipe Manana Date: Mon, 6 Nov 2023 20:19:35 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [syzbot] [btrfs?] memory leak in btrfs_add_delayed_tree_ref 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 12:20:42 -0800 (PST) On Mon, Nov 6, 2023 at 5:59=E2=80=AFPM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit: 8f6f76a6a29f Merge tag 'mm-nonmm-stable-2023-11-02-14-08'= .. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=3D15169b8768000= 0 > kernel config: https://syzkaller.appspot.com/x/.config?x=3D5ea2285f517f9= 4d0 > dashboard link: https://syzkaller.appspot.com/bug?extid=3Dd3ddc6dcc6386de= a398b > compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for D= ebian) 2.40 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=3D179c2ecf680= 000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=3D149dff40e8000= 0 > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/dfead0cc157b/dis= k-8f6f76a6.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/c2ab876430bc/vmlinu= x-8f6f76a6.xz > kernel image: https://storage.googleapis.com/syzbot-assets/e9cd314888e8/b= zImage-8f6f76a6.xz > mounted in repro: https://storage.googleapis.com/syzbot-assets/4a497ff0ef= 1a/mount_0.gz > > IMPORTANT: if you fix the issue, please add the following tag to the comm= it: > Reported-by: syzbot+d3ddc6dcc6386dea398b@syzkaller.appspotmail.com #syz fix: btrfs: fix qgroup record leaks when using simple quotas https://lore.kernel.org/linux-btrfs/2431d473c04bede4387c081007d532758fcd2f2= 8.1699301753.git.fdmanana@suse.com/ > > executing program > BUG: memory leak > unreferenced object 0xffff88810891e940 (size 64): > comm "syz-executor244", pid 5031, jiffies 4294941874 (age 13.150s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 e0 51 00 00 00 00 00 ..........Q..... > backtrace: > [] kmemleak_alloc_recursive include/linux/kmemleak.= h:42 [inline] > [] slab_post_alloc_hook mm/slab.h:766 [inline] > [] slab_alloc_node mm/slub.c:3478 [inline] > [] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:35= 17 > [] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098 > [] kmalloc include/linux/slab.h:600 [inline] > [] kzalloc include/linux/slab.h:721 [inline] > [] btrfs_add_delayed_tree_ref+0x550/0x5b0 fs/btrfs/= delayed-ref.c:1045 > [] btrfs_alloc_tree_block+0x65b/0x7c0 fs/btrfs/exte= nt-tree.c:5153 > [] btrfs_force_cow_block+0x1be/0xb30 fs/btrfs/ctree= .c:563 > [] btrfs_cow_block+0x128/0x3b0 fs/btrfs/ctree.c:741 > [] btrfs_search_slot+0xa49/0x1770 fs/btrfs/ctree.c:= 2095 > [] btrfs_insert_empty_items+0x43/0xc0 fs/btrfs/ctre= e.c:4285 > [] btrfs_create_new_inode+0x354/0xfe0 fs/btrfs/inod= e.c:6283 > [] btrfs_create_common+0xf7/0x190 fs/btrfs/inode.c:= 6511 > [] btrfs_create+0x72/0x90 fs/btrfs/inode.c:6551 > [] lookup_open fs/namei.c:3477 [inline] > [] open_last_lookups fs/namei.c:3546 [inline] > [] path_openat+0x17df/0x1d60 fs/namei.c:3776 > [] do_filp_open+0xd1/0x1c0 fs/namei.c:3809 > [] do_sys_openat2+0xf4/0x150 fs/open.c:1440 > [] do_sys_open fs/open.c:1455 [inline] > [] __do_sys_open fs/open.c:1463 [inline] > [] __se_sys_open fs/open.c:1459 [inline] > [] __x64_sys_open+0xa5/0xf0 fs/open.c:1459 > [] do_syscall_x64 arch/x86/entry/common.c:51 [inlin= e] > [] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c= :82 > > BUG: memory leak > unreferenced object 0xffff88810891e980 (size 64): > comm "syz-executor244", pid 5031, jiffies 4294941874 (age 13.150s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 69 00 00 00 00 00 ..........i..... > backtrace: > [] kmemleak_alloc_recursive include/linux/kmemleak.= h:42 [inline] > [] slab_post_alloc_hook mm/slab.h:766 [inline] > [] slab_alloc_node mm/slub.c:3478 [inline] > [] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:35= 17 > [] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098 > [] kmalloc include/linux/slab.h:600 [inline] > [] kzalloc include/linux/slab.h:721 [inline] > [] btrfs_add_delayed_tree_ref+0x550/0x5b0 fs/btrfs/= delayed-ref.c:1045 > [] btrfs_free_tree_block+0x131/0x450 fs/btrfs/exten= t-tree.c:3432 > [] btrfs_force_cow_block+0x6d8/0xb30 fs/btrfs/ctree= .c:618 > [] btrfs_cow_block+0x128/0x3b0 fs/btrfs/ctree.c:741 > [] btrfs_search_slot+0xa49/0x1770 fs/btrfs/ctree.c:= 2095 > [] btrfs_insert_empty_items+0x43/0xc0 fs/btrfs/ctre= e.c:4285 > [] btrfs_create_new_inode+0x354/0xfe0 fs/btrfs/inod= e.c:6283 > [] btrfs_create_common+0xf7/0x190 fs/btrfs/inode.c:= 6511 > [] btrfs_create+0x72/0x90 fs/btrfs/inode.c:6551 > [] lookup_open fs/namei.c:3477 [inline] > [] open_last_lookups fs/namei.c:3546 [inline] > [] path_openat+0x17df/0x1d60 fs/namei.c:3776 > [] do_filp_open+0xd1/0x1c0 fs/namei.c:3809 > [] do_sys_openat2+0xf4/0x150 fs/open.c:1440 > [] do_sys_open fs/open.c:1455 [inline] > [] __do_sys_open fs/open.c:1463 [inline] > [] __se_sys_open fs/open.c:1459 [inline] > [] __x64_sys_open+0xa5/0xf0 fs/open.c:1459 > [] do_syscall_x64 arch/x86/entry/common.c:51 [inlin= e] > [] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c= :82 > > BUG: memory leak > unreferenced object 0xffff88810891ea00 (size 64): > comm "syz-executor244", pid 5031, jiffies 4294941874 (age 13.150s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 f0 51 00 00 00 00 00 ..........Q..... > backtrace: > [] kmemleak_alloc_recursive include/linux/kmemleak.= h:42 [inline] > [] slab_post_alloc_hook mm/slab.h:766 [inline] > [] slab_alloc_node mm/slub.c:3478 [inline] > [] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:35= 17 > [] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098 > [] kmalloc include/linux/slab.h:600 [inline] > [] kzalloc include/linux/slab.h:721 [inline] > [] btrfs_add_delayed_tree_ref+0x550/0x5b0 fs/btrfs/= delayed-ref.c:1045 > [] btrfs_alloc_tree_block+0x65b/0x7c0 fs/btrfs/exte= nt-tree.c:5153 > [] btrfs_force_cow_block+0x1be/0xb30 fs/btrfs/ctree= .c:563 > [] btrfs_cow_block+0x128/0x3b0 fs/btrfs/ctree.c:741 > [] btrfs_search_slot+0xa49/0x1770 fs/btrfs/ctree.c:= 2095 > [] btrfs_insert_empty_items+0x43/0xc0 fs/btrfs/ctre= e.c:4285 > [] btrfs_create_new_inode+0x354/0xfe0 fs/btrfs/inod= e.c:6283 > [] btrfs_create_common+0xf7/0x190 fs/btrfs/inode.c:= 6511 > [] btrfs_create+0x72/0x90 fs/btrfs/inode.c:6551 > [] lookup_open fs/namei.c:3477 [inline] > [] open_last_lookups fs/namei.c:3546 [inline] > [] path_openat+0x17df/0x1d60 fs/namei.c:3776 > [] do_filp_open+0xd1/0x1c0 fs/namei.c:3809 > [] do_sys_openat2+0xf4/0x150 fs/open.c:1440 > [] do_sys_open fs/open.c:1455 [inline] > [] __do_sys_open fs/open.c:1463 [inline] > [] __se_sys_open fs/open.c:1459 [inline] > [] __x64_sys_open+0xa5/0xf0 fs/open.c:1459 > [] do_syscall_x64 arch/x86/entry/common.c:51 [inlin= e] > [] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c= :82 > > > > --- > This report is generated by a bot. It may contain errors. > See https://goo.gl/tpsmEJ for more information about syzbot. > syzbot engineers can be reached at syzkaller@googlegroups.com. > > syzbot will keep track of this issue. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > > If the report is already addressed, let syzbot know by replying with: > #syz fix: exact-commit-title > > If you want syzbot to run the reproducer, reply with: > #syz test: git://repo/address.git branch-or-commit-hash > If you attach or paste a git patch, syzbot will apply it before testing. > > If you want to overwrite report's subsystems, reply with: > #syz set subsystems: new-subsystem > (See the list of subsystem names on the web dashboard) > > If the report is a duplicate of another one, reply with: > #syz dup: exact-subject-of-another-report > > If you want to undo deduplication, reply with: > #syz undup