R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000006e R14: 00007f39381ac050 R15: 00007ffc50cbab18 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3461! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 3 PID: 24043 Comm: syz-executor.0 Not tainted 6.7.0-syzkaller-02723-gde927f6c0b07 #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+0x841/0xb60 fs/btrfs/extent-tree.c:3461 Code: 02 00 00 48 8b 13 41 b8 01 00 00 00 4c 89 e7 48 89 ee e8 72 7d fe ff 48 89 ef e8 3a ba 26 00 e9 78 fb ff ff e8 a0 44 11 fe 90 <0f> 0b e8 98 44 11 fe 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 RSP: 0018:ffffc9000d77eed0 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff888056a13b20 RCX: ffffc90006aa5000 RDX: 0000000000040000 RSI: ffffffff8375b850 RDI: 0000000000000005 RBP: 0000000000000002 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 6637303030302052 R12: ffff8880355e9d40 R13: ffff888056a13b28 R14: 00000000fffffff4 R15: 0000000000000001 FS: 00007f3938e956c0(0000) GS:ffff88806b900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30c2a000 CR3: 0000000025000000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_force_cow_block+0xfe3/0x19e0 fs/btrfs/ctree.c:626 btrfs_cow_block+0x2b6/0xb30 fs/btrfs/ctree.c:749 btrfs_search_slot+0x11bd/0x3010 fs/btrfs/ctree.c:2104 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+0x2eb/0x2f70 fs/btrfs/extent-tree.c:3136 run_delayed_data_ref fs/btrfs/extent-tree.c:1613 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1803 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:2064 [inline] __btrfs_run_delayed_refs+0x1161/0x3f20 fs/btrfs/extent-tree.c:2134 btrfs_run_delayed_refs+0x1a6/0x330 fs/btrfs/extent-tree.c:2246 btrfs_commit_transaction+0x783/0x3b40 fs/btrfs/transaction.c:2235 btrfs_sync_file+0xf91/0x1300 fs/btrfs/file.c:2007 vfs_fsync_range+0x141/0x220 fs/sync.c:188 generic_write_sync include/linux/fs.h:2735 [inline] btrfs_do_write_iter+0x576/0x1120 fs/btrfs/file.c:1697 call_write_iter include/linux/fs.h:2085 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x64f/0xdf0 fs/read_write.c:590 ksys_write+0x12f/0x250 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f393807cd29 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:00007f3938e950c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f39381ac050 RCX: 00007f393807cd29 RDX: 0000000000000010 RSI: 0000000020002240 RDI: 0000000000000006 RBP: 00007f3938e95120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000006e R14: 00007f39381ac050 R15: 00007ffc50cbab18 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0x841/0xb60 fs/btrfs/extent-tree.c:3461 Code: 02 00 00 48 8b 13 41 b8 01 00 00 00 4c 89 e7 48 89 ee e8 72 7d fe ff 48 89 ef e8 3a ba 26 00 e9 78 fb ff ff e8 a0 44 11 fe 90 <0f> 0b e8 98 44 11 fe 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 RSP: 0018:ffffc9000d77eed0 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff888056a13b20 RCX: ffffc90006aa5000 RDX: 0000000000040000 RSI: ffffffff8375b850 RDI: 0000000000000005 RBP: 0000000000000002 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 6637303030302052 R12: ffff8880355e9d40 R13: ffff888056a13b28 R14: 00000000fffffff4 R15: 0000000000000001 FS: 00007f3938e956c0(0000) GS:ffff88806b900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30c2a000 CR3: 0000000025000000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400