R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000000b R14: 00007f414df9bf80 R15: 00007ffe8a7adbb8 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3439! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 24298 Comm: syz-executor.3 Not tainted 6.7.0-rc4-syzkaller #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+0x7e4/0xbe0 fs/btrfs/extent-tree.c:3439 Code: fc fd 31 ff 89 c5 89 c6 e8 39 d4 13 fe 40 84 ed 0f 85 e6 fb ff ff e8 fb d8 13 fe 90 0f 0b 90 e9 d8 fb ff ff e8 ed d8 13 fe 90 <0f> 0b e8 e5 d8 13 fe 49 8d 7c 24 30 48 b8 00 00 00 00 00 fc ff df RSP: 0018:ffffc90023e06c78 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff8880243ae7e0 RCX: ffffc90003e7c000 RDX: 0000000000040000 RSI: ffffffff8372a773 RDI: 0000000000000005 RBP: 0000000000000002 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000008 R12: ffff88802b389a68 R13: ffff8880243ae7e8 R14: 00000000fffffff4 R15: 0000000000000001 FS: 00007f414ec206c0(0000) GS:ffff88806b600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30f29000 CR3: 0000000034447000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 00000000080038fe DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: btrfs_force_cow_block+0xfe3/0x19e0 fs/btrfs/ctree.c:618 btrfs_cow_block+0x2b6/0xb30 fs/btrfs/ctree.c:741 btrfs_search_slot+0x11bd/0x2fd0 fs/btrfs/ctree.c:2095 lookup_inline_extent_backref+0x28f/0x1520 fs/btrfs/extent-tree.c:830 lookup_extent_backref+0x46/0x110 fs/btrfs/extent-tree.c:1062 __btrfs_free_extent.isra.0+0x2f9/0x2f90 fs/btrfs/extent-tree.c:3114 run_delayed_data_ref fs/btrfs/extent-tree.c:1599 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1788 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:2042 [inline] __btrfs_run_delayed_refs+0x1168/0x3f50 fs/btrfs/extent-tree.c:2112 btrfs_run_delayed_refs+0x1a6/0x330 fs/btrfs/extent-tree.c:2224 btrfs_commit_transaction+0x783/0x3b40 fs/btrfs/transaction.c:2237 btrfs_sync_file+0xfa9/0x1320 fs/btrfs/file.c:2004 vfs_fsync_range+0x141/0x220 fs/sync.c:188 generic_write_sync include/linux/fs.h:2653 [inline] btrfs_do_write_iter+0x576/0x1120 fs/btrfs/file.c:1694 call_write_iter include/linux/fs.h:2020 [inline] do_iter_readv_writev+0x21e/0x3c0 fs/read_write.c:735 do_iter_write+0x17f/0x7f0 fs/read_write.c:860 vfs_writev+0x221/0x700 fs/read_write.c:933 do_pwritev+0x1af/0x260 fs/read_write.c:1030 __do_sys_pwritev2 fs/read_write.c:1089 [inline] __se_sys_pwritev2 fs/read_write.c:1080 [inline] __x64_sys_pwritev2+0xef/0x150 fs/read_write.c:1080 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f414de7cae9 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:00007f414ec200c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f414df9bf80 RCX: 00007f414de7cae9 RDX: 0000000000000001 RSI: 00000000200026c0 RDI: 0000000000000004 RBP: 00007f414ec20120 R08: 0000000000000000 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000000b R14: 00007f414df9bf80 R15: 00007ffe8a7adbb8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0x7e4/0xbe0 fs/btrfs/extent-tree.c:3439 Code: fc fd 31 ff 89 c5 89 c6 e8 39 d4 13 fe 40 84 ed 0f 85 e6 fb ff ff e8 fb d8 13 fe 90 0f 0b 90 e9 d8 fb ff ff e8 ed d8 13 fe 90 <0f> 0b e8 e5 d8 13 fe 49 8d 7c 24 30 48 b8 00 00 00 00 00 fc ff df RSP: 0018:ffffc90023e06c78 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff8880243ae7e0 RCX: ffffc90003e7c000 RDX: 0000000000040000 RSI: ffffffff8372a773 RDI: 0000000000000005 RBP: 0000000000000002 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000008 R12: ffff88802b389a68 R13: ffff8880243ae7e8 R14: 00000000fffffff4 R15: 0000000000000001 FS: 00007f414ec206c0(0000) GS:ffff88806b700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd1cac33b8 CR3: 0000000034447000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 000000000000f7e9 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400