RDX: 00000000200003c0 RSI: 00000000c4009420 RDI: 0000000000000004 RBP: 0000000000000002 R08: 00007fffdaebcbb6 R09: 0000000000003233 R10: 0000000000000002 R11: 0000000000000246 R12: 00007fffdaebce70 R13: 00007fffdaebd0f8 R14: 431bde82d7b634db R15: 00007faafd2a701d ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3277! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 3549 Comm: syz-executor256 Not tainted 6.1.45-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 RIP: 0010:btrfs_free_tree_block+0xd1b/0xd20 fs/btrfs/extent-tree.c:3277 Code: 44 89 f1 80 e1 07 38 c1 0f 8c 90 f8 ff ff be 08 00 00 00 4c 89 f7 e8 a4 87 60 fe e9 7e f8 ff ff e8 8a cb 04 07 e8 35 f4 09 fe <0f> 0b 0f 1f 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 38 49 89 f7 RSP: 0018:ffffc90003bdf4c0 EFLAGS: 00010293 RAX: ffffffff838009cb RBX: 00000000fffffff4 RCX: ffff88807d2d0000 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: ffffc90003bdf610 R08: ffffffff83800025 R09: fffffbfff1a4365b R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880241e4120 R13: dffffc0000000000 R14: 0000000000000001 R15: ffffc90003bdf540 FS: 00005555557fe480(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020001000 CR3: 0000000076d3a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __btrfs_cow_block+0xe79/0x1970 fs/btrfs/ctree.c:488 btrfs_cow_block+0x3df/0x7d0 fs/btrfs/ctree.c:593 btrfs_search_slot+0xbe5/0x2f00 fs/btrfs/ctree.c:2041 btrfs_insert_empty_items+0x98/0x180 fs/btrfs/ctree.c:4139 btrfs_insert_empty_item fs/btrfs/ctree.h:3130 [inline] insert_balance_item+0x2c8/0x20b0 fs/btrfs/volumes.c:3488 btrfs_balance+0x98a/0x10c0 fs/btrfs/volumes.c:4387 btrfs_ioctl_balance+0x493/0x7c0 fs/btrfs/ioctl.c:4488 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7faafd25e699 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffdaebce18 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fffdaebce20 RCX: 00007faafd25e699 RDX: 00000000200003c0 RSI: 00000000c4009420 RDI: 0000000000000004 RBP: 0000000000000002 R08: 00007fffdaebcbb6 R09: 0000000000003233 R10: 0000000000000002 R11: 0000000000000246 R12: 00007fffdaebce70 R13: 00007fffdaebd0f8 R14: 431bde82d7b634db R15: 00007faafd2a701d Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0xd1b/0xd20 fs/btrfs/extent-tree.c:3277 Code: 44 89 f1 80 e1 07 38 c1 0f 8c 90 f8 ff ff be 08 00 00 00 4c 89 f7 e8 a4 87 60 fe e9 7e f8 ff ff e8 8a cb 04 07 e8 35 f4 09 fe <0f> 0b 0f 1f 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 38 49 89 f7 RSP: 0018:ffffc90003bdf4c0 EFLAGS: 00010293 RAX: ffffffff838009cb RBX: 00000000fffffff4 RCX: ffff88807d2d0000 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: ffffc90003bdf610 R08: ffffffff83800025 R09: fffffbfff1a4365b R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880241e4120 R13: dffffc0000000000 R14: 0000000000000001 R15: ffffc90003bdf540 FS: 00005555557fe480(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020001000 CR3: 0000000076d3a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400