R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3252! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 15239 Comm: syz-executor.2 Not tainted 6.5.0-rc7-syzkaller-00087-gb5cc3833f13a #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+0x788/0xb50 fs/btrfs/extent-tree.c:3252 Code: e8 1d 86 01 fe 31 ff 89 c5 89 c6 e8 62 bf 18 fe 40 84 ed 0f 85 e5 fb ff ff e8 24 c4 18 fe 0f 0b e9 d9 fb ff ff e8 18 c4 18 fe <0f> 0b e8 11 c4 18 fe 49 8d 7d 20 48 b8 00 00 00 00 00 fc ff df 48 RSP: 0018:ffffc9002465f4c0 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff888029da3620 RCX: ffffc900040d9000 RDX: 0000000000040000 RSI: ffffffff836d4488 RDI: 0000000000000005 RBP: 0000000000000002 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 3030303030302052 R12: 1ffff920048cbe9d R13: ffff888045a63a80 R14: 0000000000000001 R15: ffff888029da3628 FS: 0000000000000000(0000) GS:ffff88802c700000(0063) knlGS:00000000f7efdb40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000560daa1fb680 CR3: 00000000227f5000 CR4: 0000000000350ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __btrfs_cow_block+0xfb3/0x18e0 fs/btrfs/ctree.c:601 btrfs_cow_block+0x2f1/0x820 fs/btrfs/ctree.c:712 btrfs_search_slot+0x12a0/0x30e0 fs/btrfs/ctree.c:2194 btrfs_insert_empty_items+0xb7/0x1b0 fs/btrfs/ctree.c:4376 btrfs_insert_empty_item fs/btrfs/ctree.h:636 [inline] alloc_reserved_tree_block fs/btrfs/extent-tree.c:4659 [inline] run_delayed_tree_ref fs/btrfs/extent-tree.c:1673 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1702 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1948 [inline] __btrfs_run_delayed_refs+0x1c96/0x3b80 fs/btrfs/extent-tree.c:2009 btrfs_run_delayed_refs+0x1a1/0x510 fs/btrfs/extent-tree.c:2121 btrfs_commit_transaction+0x81a/0x3fd0 fs/btrfs/transaction.c:2163 btrfs_sync_file+0xfa1/0x1310 fs/btrfs/file.c:1988 vfs_fsync_range+0x141/0x220 fs/sync.c:188 vfs_fsync fs/sync.c:202 [inline] do_fsync fs/sync.c:212 [inline] __do_sys_fsync fs/sync.c:220 [inline] __se_sys_fsync fs/sync.c:218 [inline] __ia32_sys_fsync+0x72/0xd0 fs/sync.c:218 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f02579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7efd5ac EFLAGS: 00000292 ORIG_RAX: 0000000000000076 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0x788/0xb50 fs/btrfs/extent-tree.c:3252 Code: e8 1d 86 01 fe 31 ff 89 c5 89 c6 e8 62 bf 18 fe 40 84 ed 0f 85 e5 fb ff ff e8 24 c4 18 fe 0f 0b e9 d9 fb ff ff e8 18 c4 18 fe <0f> 0b e8 11 c4 18 fe 49 8d 7d 20 48 b8 00 00 00 00 00 fc ff df 48 RSP: 0018:ffffc9002465f4c0 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff888029da3620 RCX: ffffc900040d9000 RDX: 0000000000040000 RSI: ffffffff836d4488 RDI: 0000000000000005 RBP: 0000000000000002 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 3030303030302052 R12: 1ffff920048cbe9d R13: ffff888045a63a80 R14: 0000000000000001 R15: ffff888029da3628 FS: 0000000000000000(0000) GS:ffff88802c700000(0063) knlGS:00000000f7efdb40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000560daa1fb680 CR3: 00000000227f5000 CR4: 0000000000350ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi