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 432BCC4167B for ; Mon, 6 Nov 2023 17:58:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231980AbjKFR6f (ORCPT ); Mon, 6 Nov 2023 12:58:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbjKFR6d (ORCPT ); Mon, 6 Nov 2023 12:58:33 -0500 Received: from mail-oa1-f78.google.com (mail-oa1-f78.google.com [209.85.160.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51CEBD49 for ; Mon, 6 Nov 2023 09:58:30 -0800 (PST) Received: by mail-oa1-f78.google.com with SMTP id 586e51a60fabf-1e1a878ef40so6280051fac.1 for ; Mon, 06 Nov 2023 09:58:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699293509; x=1699898309; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cEwpAGHL4EI/McPACelobvea5qiK1E1BuwDNpbN5Cvw=; b=sm53vCcjYwDYWTGWjl6YCENChcB8KjDsRIeRqn7wN0Q+a16ndI+VPwkm3HuXncMoVT W7yjtXnned9U41UK9mfzk6w2cwtw9YxVJFEMabIv4NZeN//iEe7hzMXOcjkrqH9vGf3u VavekvhvlcPFpi+1N5Dmj6ubuAfDY1xoMl/lQfw9GNdEFcS6gt9/QFG6Ly8ZOpTEwgd6 INVqc9ZfjHXLvfMfXfSTxqdR6uFdBuzqWqvMRA8aacSdLARRBhb4SWo96Zw11y2UvsWF aVuc/3eShSPxQ67Zt/9ylmXMy6McSj9hADANrA4J0g24FPWHVsXgnAunP1oqYi6g4m2Z d6pw== X-Gm-Message-State: AOJu0YysHUI+YMxHOQV0SMQVeMBLHaxKkGtLQPUY+xr48xYJXuPbzwuI /EI5X5BQSX0zeiAAndnmqnk4dRt8FjXVRnbkgacF7m1eiL00 X-Google-Smtp-Source: AGHT+IFVdGyGw4V9NalCvcwOQMO5/jv1/gIhFzEs+6lpVCpt8jlug0h41Tj+reKtxIf2znLbcFPCjtySt2mvQ6TIbz6QBKuzPlFS MIME-Version: 1.0 X-Received: by 2002:a05:6870:9a19:b0:1dd:1837:c704 with SMTP id fo25-20020a0568709a1900b001dd1837c704mr226202oab.2.1699293509742; Mon, 06 Nov 2023 09:58:29 -0800 (PST) Date: Mon, 06 Nov 2023 09:58:29 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <00000000000004769106097f9a34@google.com> Subject: [syzbot] [btrfs?] memory leak in btrfs_add_delayed_tree_ref From: syzbot To: 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=15169b87680000 kernel config: https://syzkaller.appspot.com/x/.config?x=5ea2285f517f94d0 dashboard link: https://syzkaller.appspot.com/bug?extid=d3ddc6dcc6386dea398b compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=179c2ecf680000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=149dff40e80000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/dfead0cc157b/disk-8f6f76a6.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/c2ab876430bc/vmlinux-8f6f76a6.xz kernel image: https://storage.googleapis.com/syzbot-assets/e9cd314888e8/bzImage-8f6f76a6.xz mounted in repro: https://storage.googleapis.com/syzbot-assets/4a497ff0ef1a/mount_0.gz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+d3ddc6dcc6386dea398b@syzkaller.appspotmail.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:3517 [] 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/extent-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/ctree.c:4285 [] btrfs_create_new_inode+0x354/0xfe0 fs/btrfs/inode.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 [inline] [] 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:3517 [] 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/extent-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/ctree.c:4285 [] btrfs_create_new_inode+0x354/0xfe0 fs/btrfs/inode.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 [inline] [] 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:3517 [] 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/extent-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/ctree.c:4285 [] btrfs_create_new_inode+0x354/0xfe0 fs/btrfs/inode.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 [inline] [] 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