R10: 0000000000101000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000000b R14: 00007fac4039bf80 R15: 00007ffe5f96fa28 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3452! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 PID: 5630 Comm: syz-executor.2 Not tainted 6.10.0-rc2-syzkaller-g8a92980606e3 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:btrfs_free_tree_block+0x930/0xc40 fs/btrfs/extent-tree.c:3452 Code: 03 fe b9 77 0d 00 00 48 c7 c2 40 6c 76 8b 48 c7 c6 e0 7f 76 8b 48 c7 c7 a0 6f 76 8b e8 a9 43 e4 fd 90 0f 0b e8 d1 d4 03 fe 90 <0f> 0b e8 c9 d4 03 fe 48 8d 7b 08 48 b8 00 00 00 00 00 fc ff df 48 RSP: 0018:ffffc900034deca0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88802d13fc20 RCX: ffffffff838a09d5 RDX: ffff88801be20000 RSI: ffffffff838a101f RDI: 0000000000000005 RBP: 1ffff9200069bd98 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000009 R12: ffff8880404aef08 R13: 000000000000000a R14: 0000000000000001 R15: ffffc900034decf0 FS: 00007fac40f906c0(0000) GS:ffff88806b000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f03fdee1bd0 CR3: 000000001e2ee000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_force_cow_block+0xfe7/0x19e0 fs/btrfs/ctree.c:623 btrfs_cow_block+0x2b6/0xb70 fs/btrfs/ctree.c:746 btrfs_search_slot+0x11bd/0x3010 fs/btrfs/ctree.c:2101 btrfs_search_prev_slot.constprop.0+0x36/0x110 fs/btrfs/free-space-tree.c:140 add_free_space_extent fs/btrfs/free-space-tree.c:910 [inline] __add_to_free_space_tree+0x36a/0xbf0 fs/btrfs/free-space-tree.c:1021 add_to_free_space_tree+0x17d/0x330 fs/btrfs/free-space-tree.c:1050 do_free_extent_accounting fs/btrfs/extent-tree.c:2988 [inline] __btrfs_free_extent.isra.0+0x1241/0x3150 fs/btrfs/extent-tree.c:3358 run_delayed_data_ref fs/btrfs/extent-tree.c:1582 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1766 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:2027 [inline] __btrfs_run_delayed_refs+0xa21/0x3d20 fs/btrfs/extent-tree.c:2097 btrfs_run_delayed_refs+0x1a6/0x330 fs/btrfs/extent-tree.c:2209 btrfs_commit_transaction+0x783/0x3b30 fs/btrfs/transaction.c:2179 btrfs_sync_file+0xb1a/0xe10 fs/btrfs/file.c:2042 vfs_fsync_range+0x141/0x230 fs/sync.c:188 generic_write_sync include/linux/fs.h:2794 [inline] btrfs_do_write_iter+0x584/0x10c0 fs/btrfs/file.c:1705 do_iter_readv_writev+0x504/0x780 fs/read_write.c:741 vfs_writev+0x36f/0xde0 fs/read_write.c:971 do_pwritev+0x1b2/0x260 fs/read_write.c:1072 __do_sys_pwritev2 fs/read_write.c:1131 [inline] __se_sys_pwritev2 fs/read_write.c:1122 [inline] __x64_sys_pwritev2+0xef/0x160 fs/read_write.c:1122 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fac4027cae9 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:00007fac40f900c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007fac4039bf80 RCX: 00007fac4027cae9 RDX: 0000000000000001 RSI: 0000000020000680 RDI: 0000000000000004 RBP: 00007fac40f90120 R08: 0000000000000000 R09: 0000000000000002 R10: 0000000000101000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000000b R14: 00007fac4039bf80 R15: 00007ffe5f96fa28 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0x930/0xc40 fs/btrfs/extent-tree.c:3452 Code: 03 fe b9 77 0d 00 00 48 c7 c2 40 6c 76 8b 48 c7 c6 e0 7f 76 8b 48 c7 c7 a0 6f 76 8b e8 a9 43 e4 fd 90 0f 0b e8 d1 d4 03 fe 90 <0f> 0b e8 c9 d4 03 fe 48 8d 7b 08 48 b8 00 00 00 00 00 fc ff df 48 RSP: 0018:ffffc900034deca0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88802d13fc20 RCX: ffffffff838a09d5 RDX: ffff88801be20000 RSI: ffffffff838a101f RDI: 0000000000000005 RBP: 1ffff9200069bd98 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000009 R12: ffff8880404aef08 R13: 000000000000000a R14: 0000000000000001 R15: ffffc900034decf0 FS: 00007fac40f906c0(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005556503a6d50 CR3: 000000001e2ee000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400