------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3274! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 11069 Comm: syz-executor.1 Not tainted 6.1.0-rc1-next-20221021-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 RIP: 0010:btrfs_free_tree_block+0x262/0xcd0 fs/btrfs/extent-tree.c:3274 Code: 00 48 8b 74 24 10 31 d2 4c 89 e7 e8 b8 8d 17 00 31 ff 89 c6 89 44 24 10 e8 3b 3a 22 fe 8b 44 24 10 85 c0 74 26 e8 5e 3d 22 fe <0f> 0b e8 57 3d 22 fe 48 89 ee 48 c7 c7 fa ff ff ff c6 44 24 58 01 RSP: 0018:ffffc90006f0f1b0 EFLAGS: 00010212 RAX: 0000000000001732 RBX: ffff8880286b21f0 RCX: ffffc9000e29a000 RDX: 0000000000040000 RSI: ffffffff835a57d2 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 000000000008c001 R12: ffff88808c5d7c78 R13: 1ffff92000de1e3a R14: 0000000000000001 R15: ffff88807c4d8000 FS: 00007f47036ab700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb0013ad0b0 CR3: 000000007de31000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __btrfs_cow_block+0x1127/0x1630 fs/btrfs/ctree.c:467 btrfs_cow_block+0x2f6/0x950 fs/btrfs/ctree.c:572 btrfs_search_slot+0x11ac/0x2c70 fs/btrfs/ctree.c:2009 btrfs_insert_empty_items+0xb9/0x1c0 fs/btrfs/ctree.c:4103 btrfs_create_new_inode+0x8ba/0x29a0 fs/btrfs/inode.c:6410 btrfs_create_common+0x1d5/0x260 fs/btrfs/inode.c:6639 btrfs_create+0x112/0x160 fs/btrfs/inode.c:6679 lookup_open.isra.0+0xf05/0x12a0 fs/namei.c:3413 open_last_lookups fs/namei.c:3481 [inline] path_openat+0x990/0x2850 fs/namei.c:3710 do_filp_open+0x1b6/0x400 fs/namei.c:3740 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f470248b5f9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f47036ab168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f47025ac050 RCX: 00007f470248b5f9 RDX: 000000000000275a RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00007f47036ab1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffe5b7458ef R14: 00007f47036ab300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0x262/0xcd0 fs/btrfs/extent-tree.c:3274 Code: 00 48 8b 74 24 10 31 d2 4c 89 e7 e8 b8 8d 17 00 31 ff 89 c6 89 44 24 10 e8 3b 3a 22 fe 8b 44 24 10 85 c0 74 26 e8 5e 3d 22 fe <0f> 0b e8 57 3d 22 fe 48 89 ee 48 c7 c7 fa ff ff ff c6 44 24 58 01 RSP: 0018:ffffc90006f0f1b0 EFLAGS: 00010212 RAX: 0000000000001732 RBX: ffff8880286b21f0 RCX: ffffc9000e29a000 RDX: 0000000000040000 RSI: ffffffff835a57d2 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 000000000008c001 R12: ffff88808c5d7c78 R13: 1ffff92000de1e3a R14: 0000000000000001 R15: ffff88807c4d8000 FS: 00007f47036ab700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f974bfc9718 CR3: 000000007de31000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400