------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3462! invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 1 PID: 5854 Comm: syz-executor.4 Not tainted 6.8.0-rc3-syzkaller-00010-g6d280f4d760e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 RIP: 0010:btrfs_free_tree_block+0xd31/0xd40 fs/btrfs/extent-tree.c:3462 Code: 89 f1 80 e1 07 38 c1 0f 8c a1 f8 ff ff be 08 00 00 00 4c 89 f7 e8 3f d9 57 fe e9 8f f8 ff ff e8 d5 40 c3 07 e8 10 0a f9 fd 90 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 90 90 90 90 90 90 90 RSP: 0018:ffffc900149b6ca0 EFLAGS: 00010246 RAX: ffffffff839a5c20 RBX: 00000000fffffff4 RCX: 0000000000040000 RDX: ffffc9000a896000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffffc900149b6e10 R08: ffffffff839a52ac R09: 1ffffffff258a4a6 R10: dffffc0000000000 R11: fffffbfff258a4a7 R12: ffff000000000100 R13: dffffc0000000000 R14: 0000000000000002 R15: ffffc900149b6d40 FS: 00007f66940466c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f38527ff000 CR3: 000000001ed62000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_force_cow_block+0xf37/0x1b70 fs/btrfs/ctree.c:626 btrfs_cow_block+0x35e/0xa20 fs/btrfs/ctree.c:749 btrfs_search_slot+0xbdd/0x30c0 fs/btrfs/ctree.c:2104 lookup_inline_extent_backref+0x409/0x1660 fs/btrfs/extent-tree.c:830 lookup_extent_backref fs/btrfs/extent-tree.c:1062 [inline] __btrfs_free_extent+0x2f3/0x3910 fs/btrfs/extent-tree.c:3137 run_delayed_tree_ref fs/btrfs/extent-tree.c:1773 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1800 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:2065 [inline] __btrfs_run_delayed_refs+0x130d/0x46c0 fs/btrfs/extent-tree.c:2135 btrfs_run_delayed_refs+0xe3/0x2c0 fs/btrfs/extent-tree.c:2247 btrfs_commit_transaction+0x4ba/0x3740 fs/btrfs/transaction.c:2235 iterate_supers+0xc6/0x190 fs/super.c:927 ksys_sync+0xdb/0x1c0 fs/sync.c:104 __do_sys_sync+0xe/0x20 fs/sync.c:113 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f669327dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f66940460c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2 RAX: ffffffffffffffda RBX: 00007f66933abf80 RCX: 00007f669327dda9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f6694046120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 000000000000000b R14: 00007f66933abf80 R15: 00007ffd5eca25e8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0xd31/0xd40 fs/btrfs/extent-tree.c:3462 Code: 89 f1 80 e1 07 38 c1 0f 8c a1 f8 ff ff be 08 00 00 00 4c 89 f7 e8 3f d9 57 fe e9 8f f8 ff ff e8 d5 40 c3 07 e8 10 0a f9 fd 90 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 90 90 90 90 90 90 90 RSP: 0018:ffffc900149b6ca0 EFLAGS: 00010246 RAX: ffffffff839a5c20 RBX: 00000000fffffff4 RCX: 0000000000040000 RDX: ffffc9000a896000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffffc900149b6e10 R08: ffffffff839a52ac R09: 1ffffffff258a4a6 R10: dffffc0000000000 R11: fffffbfff258a4a7 R12: ffff000000000100 R13: dffffc0000000000 R14: 0000000000000002 R15: ffffc900149b6d40 FS: 00007f66940466c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110f35af69 CR3: 000000001ed62000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400