RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc8ae88d969 RDX: 0000000000000020 RSI: 0000000020000180 RDI: 0000000000000004 RBP: 0000000000000002 R08: 0000000000000002 R09: 00007fc8ae003731 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd121133f0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3260! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 4992 Comm: syz-executor329 Not tainted 6.3.0-syzkaller-13027-g1a5304fecee5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 RIP: 0010:btrfs_free_tree_block+0xd1f/0xd30 fs/btrfs/extent-tree.c:3260 Code: 44 89 f1 80 e1 07 38 c1 0f 8c 90 f8 ff ff be 08 00 00 00 4c 89 f7 e8 50 b4 60 fe e9 7e f8 ff ff e8 46 37 2c 07 e8 41 e8 08 fe <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 41 57 41 56 RSP: 0018:ffffc90003c6e8e0 EFLAGS: 00010293 RAX: ffffffff8382a7df RBX: 00000000fffffff4 RCX: ffff888014bd9dc0 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: ffffc90003c6ea38 R08: ffffffff83829e39 R09: fffffbfff1a039b3 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88802a93e500 R13: ffff000000000005 R14: 0000000000000005 R15: ffffc90003c6e960 FS: 0000555556aba3c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000080 CR3: 000000002b59e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_del_leaf+0x24e/0x3d0 fs/btrfs/ctree.c:4338 btrfs_del_items+0xae8/0xda0 fs/btrfs/ctree.c:4450 btrfs_drop_extents+0x2514/0x3650 fs/btrfs/file.c:513 cow_file_range_inline+0x437/0x970 fs/btrfs/inode.c:457 cow_file_range+0x3ae/0xfe0 fs/btrfs/inode.c:1234 btrfs_run_delalloc_range+0x312/0x1150 fs/btrfs/inode.c:2244 writepage_delalloc+0x261/0x590 fs/btrfs/extent_io.c:1330 __extent_writepage+0x899/0x1740 fs/btrfs/extent_io.c:1609 extent_write_cache_pages fs/btrfs/extent_io.c:2477 [inline] extent_writepages+0xca7/0x1990 fs/btrfs/extent_io.c:2599 do_writepages+0x3a6/0x670 mm/page-writeback.c:2551 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:390 __filemap_fdatawrite_range mm/filemap.c:423 [inline] filemap_fdatawrite_range+0x16e/0x1e0 mm/filemap.c:441 btrfs_fdatawrite_range fs/btrfs/file.c:3862 [inline] btrfs_direct_write fs/btrfs/file.c:1603 [inline] btrfs_do_write_iter+0xefc/0x1270 fs/btrfs/file.c:1674 call_write_iter include/linux/fs.h:1868 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ec/0xc10 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fc8ae88d969 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:00007ffd121133e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc8ae88d969 RDX: 0000000000000020 RSI: 0000000020000180 RDI: 0000000000000004 RBP: 0000000000000002 R08: 0000000000000002 R09: 00007fc8ae003731 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd121133f0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0xd1f/0xd30 fs/btrfs/extent-tree.c:3260 Code: 44 89 f1 80 e1 07 38 c1 0f 8c 90 f8 ff ff be 08 00 00 00 4c 89 f7 e8 50 b4 60 fe e9 7e f8 ff ff e8 46 37 2c 07 e8 41 e8 08 fe <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 41 57 41 56 RSP: 0018:ffffc90003c6e8e0 EFLAGS: 00010293 RAX: ffffffff8382a7df RBX: 00000000fffffff4 RCX: ffff888014bd9dc0 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: ffffc90003c6ea38 R08: ffffffff83829e39 R09: fffffbfff1a039b3 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88802a93e500 R13: ffff000000000005 R14: 0000000000000005 R15: ffffc90003c6e960 FS: 0000555556aba3c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000080 CR3: 000000002b59e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400