Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe4fea10a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f57c5c01e19 RDX: 0000000000000020 RSI: 0000000020000180 RDI: 0000000000000004 RBP: 00007ffe4fea10b0 R08: 0000000000000002 R09: 00007f57c5003731 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3281! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 5062 Comm: syz-executor249 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:btrfs_free_tree_block+0x266/0xc90 fs/btrfs/extent-tree.c:3281 Code: 00 48 8b 74 24 10 31 d2 4c 89 e7 e8 d4 36 17 00 31 ff 89 c6 89 44 24 10 e8 27 6e 21 fe 8b 44 24 10 85 c0 74 26 e8 6a 71 21 fe <0f> 0b e8 63 71 21 fe 48 89 ee 48 c7 c7 fa ff ff ff c6 44 24 58 01 RSP: 0018:ffffc90003a2ec30 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff888078510d90 RCX: 0000000000000000 RDX: ffff88801b4a1d40 RSI: ffffffff835fe0d6 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000000 R12: ffff888072cce498 R13: 1ffff92000745d8a R14: 0000000000000001 R15: ffff88801cccc000 FS: 0000555557167300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000080 CR3: 0000000075ac9000 CR4: 0000000000350ef0 Call Trace: btrfs_del_leaf+0x293/0x320 fs/btrfs/ctree.c:4353 btrfs_del_items+0x9f5/0xe20 fs/btrfs/ctree.c:4465 btrfs_drop_extents+0x1ba8/0x2670 fs/btrfs/file.c:513 cow_file_range_inline+0x37e/0x7c0 fs/btrfs/inode.c:471 cow_file_range+0x987/0xd10 fs/btrfs/inode.c:1255 btrfs_run_delalloc_range+0x593/0x1300 fs/btrfs/inode.c:2264 writepage_delalloc+0x1a6/0x3e0 fs/btrfs/extent_io.c:1850 __extent_writepage+0xff0/0x1540 fs/btrfs/extent_io.c:2154 extent_write_cache_pages+0x614/0x16b0 fs/btrfs/extent_io.c:3071 extent_writepages+0x1c6/0x450 fs/btrfs/extent_io.c:3191 do_writepages+0x1af/0x690 mm/page-writeback.c:2581 filemap_fdatawrite_wbc mm/filemap.c:388 [inline] filemap_fdatawrite_wbc+0x147/0x1b0 mm/filemap.c:378 __filemap_fdatawrite_range+0xb8/0xf0 mm/filemap.c:421 btrfs_fdatawrite_range+0x4a/0x110 fs/btrfs/file.c:3850 btrfs_direct_write fs/btrfs/file.c:1603 [inline] btrfs_do_write_iter+0xf24/0x1470 fs/btrfs/file.c:1674 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9ed/0xdd0 fs/read_write.c:584 ksys_write+0x12b/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f57c5c01e19 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe4fea10a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f57c5c01e19 RDX: 0000000000000020 RSI: 0000000020000180 RDI: 0000000000000004 RBP: 00007ffe4fea10b0 R08: 0000000000000002 R09: 00007f57c5003731 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0x266/0xc90 fs/btrfs/extent-tree.c:3281 Code: 00 48 8b 74 24 10 31 d2 4c 89 e7 e8 d4 36 17 00 31 ff 89 c6 89 44 24 10 e8 27 6e 21 fe 8b 44 24 10 85 c0 74 26 e8 6a 71 21 fe <0f> 0b e8 63 71 21 fe 48 89 ee 48 c7 c7 fa ff ff ff c6 44 24 58 01 RSP: 0018:ffffc90003a2ec30 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff888078510d90 RCX: 0000000000000000 RDX: ffff88801b4a1d40 RSI: ffffffff835fe0d6 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000000 R12: ffff888072cce498 R13: 1ffff92000745d8a R14: 0000000000000001 R15: ffff88801cccc000 FS: 0000555557167300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000080 CR3: 0000000075ac9000 CR4: 0000000000350ef0 ---------------- Code disassembly (best guess): 0: 28 00 sub %al,(%rax) 2: 00 00 add %al,(%rax) 4: 75 05 jne 0xb 6: 48 83 c4 28 add $0x28,%rsp a: c3 retq b: e8 51 14 00 00 callq 0x1461 10: 90 nop 11: 48 89 f8 mov %rdi,%rax 14: 48 89 f7 mov %rsi,%rdi 17: 48 89 d6 mov %rdx,%rsi 1a: 48 89 ca mov %rcx,%rdx 1d: 4d 89 c2 mov %r8,%r10 20: 4d 89 c8 mov %r9,%r8 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9 28: 0f 05 syscall * 2a: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction 30: 73 01 jae 0x33 32: c3 retq 33: 48 c7 c1 c0 ff ff ff mov $0xffffffffffffffc0,%rcx 3a: f7 d8 neg %eax 3c: 64 89 01 mov %eax,%fs:(%rcx) 3f: 48 rex.W