R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000006e R14: 00007f6314d9c050 R15: 00007ffe65b9e448 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3474! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 PID: 5537 Comm: syz-executor.0 Not tainted 6.9.0-rc1-next-20240328-syzkaller-02532-ga6bd6c933339 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:btrfs_free_tree_block+0xbf7/0xc00 fs/btrfs/extent-tree.c:3474 Code: ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c c3 fd ff ff 48 89 df e8 d9 58 53 fe e9 b6 fd ff ff e8 df d0 d8 07 e8 2a 9d ee fd 90 <0f> 0b 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc90004cae840 EFLAGS: 00010293 RAX: ffffffff83a6cda6 RBX: 00000000fffffff4 RCX: ffff88807bbe9e00 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: ffffc90004cae988 R08: ffffffff83a6c428 R09: 1ffffffff1c88986 R10: dffffc0000000000 R11: fffffbfff1c88987 R12: dffffc0000000000 R13: ffff88807f9af250 R14: 0000000000000005 R15: ffff888071961a40 FS: 00007f63158ed6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f962be89378 CR3: 000000002e56e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_del_leaf+0x294/0x450 fs/btrfs/ctree.c:4458 btrfs_del_items+0x99a/0xc20 fs/btrfs/ctree.c:4573 btrfs_drop_extents+0x2125/0x3250 fs/btrfs/file.c:517 cow_file_range_inline+0x40a/0x900 fs/btrfs/inode.c:666 cow_file_range+0x424/0x1140 fs/btrfs/inode.c:1334 btrfs_run_delalloc_range+0x334/0xf80 fs/btrfs/inode.c:2293 writepage_delalloc+0x1e8/0x480 fs/btrfs/extent_io.c:1274 __extent_writepage fs/btrfs/extent_io.c:1526 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2203 [inline] btrfs_writepages+0x1207/0x26f0 fs/btrfs/extent_io.c:2324 do_writepages+0x359/0x870 mm/page-writeback.c:2612 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:397 __filemap_fdatawrite_range mm/filemap.c:430 [inline] filemap_fdatawrite_range+0x120/0x180 mm/filemap.c:448 btrfs_fdatawrite_range fs/btrfs/file.c:3873 [inline] btrfs_direct_write fs/btrfs/file.c:1618 [inline] btrfs_do_write_iter+0xd73/0x10a0 fs/btrfs/file.c:1685 call_write_iter include/linux/fs.h:2108 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa84/0xcb0 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7f6314c7c899 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:00007f63158ed0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6314d9c050 RCX: 00007f6314c7c899 RDX: 0000000000000020 RSI: 0000000020000180 RDI: 0000000000000004 RBP: 00007f63158ed120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000006e R14: 00007f6314d9c050 R15: 00007ffe65b9e448 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0xbf7/0xc00 fs/btrfs/extent-tree.c:3474 Code: ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c c3 fd ff ff 48 89 df e8 d9 58 53 fe e9 b6 fd ff ff e8 df d0 d8 07 e8 2a 9d ee fd 90 <0f> 0b 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc90004cae840 EFLAGS: 00010293 RAX: ffffffff83a6cda6 RBX: 00000000fffffff4 RCX: ffff88807bbe9e00 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: ffffc90004cae988 R08: ffffffff83a6c428 R09: 1ffffffff1c88986 R10: dffffc0000000000 R11: fffffbfff1c88987 R12: dffffc0000000000 R13: ffff88807f9af250 R14: 0000000000000005 R15: ffff888071961a40 FS: 00007f63158ed6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0a5e766731 CR3: 000000002e56e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400