------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3311! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 4390 Comm: syz.2.13 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 RIP: 0010:btrfs_free_tree_block+0xb71/0xb80 fs/btrfs/extent-tree.c:3311 Code: e9 02 f9 ff ff 44 89 e1 80 e1 07 38 c1 0f 8c 07 f9 ff ff be 08 00 00 00 4c 89 e7 e8 c9 33 78 fe e9 f5 f8 ff ff e8 df cd 32 fe <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 55 41 57 41 56 41 55 RSP: 0018:ffffc900011eef80 EFLAGS: 00010246 RAX: ffffffff83468991 RBX: 1ffff1100efc2a90 RCX: 0000000000080000 RDX: ffffc9000c151000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc900011ef0d0 R08: ffffffff910501ff R09: 1ffffffff220a03f R10: dffffc0000000000 R11: fffffbfff220a040 R12: ffff888061228064 R13: ffff888077e15480 R14: 00000000fffffff4 R15: 0000000000000002 FS: 00007f68f5d916c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff23d716000 CR3: 000000005eb91000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_force_cow_block+0xc4d/0x1760 fs/btrfs/ctree.c:480 btrfs_cow_block+0x33e/0x7d0 fs/btrfs/ctree.c:598 btrfs_search_slot+0x9d4/0x2090 fs/btrfs/ctree.c:-1 btrfs_insert_empty_items+0x32c/0x3e0 fs/btrfs/ctree.c:4012 btrfs_insert_empty_item fs/btrfs/ctree.h:2957 [inline] alloc_reserved_tree_block fs/btrfs/extent-tree.c:4676 [inline] run_delayed_tree_ref fs/btrfs/extent-tree.c:1702 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1731 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1977 [inline] __btrfs_run_delayed_refs+0x1123/0x3920 fs/btrfs/extent-tree.c:2041 btrfs_run_delayed_refs+0x133/0x480 fs/btrfs/extent-tree.c:2172 btrfs_commit_transaction+0x23d/0x3580 fs/btrfs/transaction.c:2180 btrfs_sync_file+0xcb8/0x10e0 fs/btrfs/file.c:2419 generic_write_sync include/linux/fs.h:3003 [inline] btrfs_file_write_iter+0xbe9/0xd80 fs/btrfs/file.c:2099 call_write_iter include/linux/fs.h:2181 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_pwrite64 fs/read_write.c:701 [inline] __do_sys_pwrite64 fs/read_write.c:711 [inline] __se_sys_pwrite64 fs/read_write.c:708 [inline] __x64_sys_pwrite64+0x197/0x220 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f68f7b44b59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f68f5d91028 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007f68f7dd0fa0 RCX: 00007f68f7b44b59 RDX: 0000000000000001 RSI: 000020000000b480 RDI: 000000000000000b RBP: 00007f68f7bd518b R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000064ff R11: 0000000000000246 R12: 0000000000000000 R13: 00007f68f7dd1038 R14: 00007f68f7dd0fa0 R15: 00007fffc66f8358 Modules linked in: ---[ end trace 3dfffd8031785086 ]--- RIP: 0010:btrfs_free_tree_block+0xb71/0xb80 fs/btrfs/extent-tree.c:3311 Code: e9 02 f9 ff ff 44 89 e1 80 e1 07 38 c1 0f 8c 07 f9 ff ff be 08 00 00 00 4c 89 e7 e8 c9 33 78 fe e9 f5 f8 ff ff e8 df cd 32 fe <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 55 41 57 41 56 41 55 RSP: 0018:ffffc900011eef80 EFLAGS: 00010246 RAX: ffffffff83468991 RBX: 1ffff1100efc2a90 RCX: 0000000000080000 RDX: ffffc9000c151000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc900011ef0d0 R08: ffffffff910501ff R09: 1ffffffff220a03f R10: dffffc0000000000 R11: fffffbfff220a040 R12: ffff888061228064 R13: ffff888077e15480 R14: 00000000fffffff4 R15: 0000000000000002 FS: 00007f68f5d916c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe8d0f472f8 CR3: 000000005eb91000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400