RBP: 00007f669fdc91d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffd428804df R14: 00007f669fdc9300 R15: 0000000000022000 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3252! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 11085 Comm: syz-executor.4 Not tainted 6.4.0-syzkaller-12155-ga452483508d7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 RIP: 0010:btrfs_free_tree_block+0x266/0xb40 fs/btrfs/extent-tree.c:3252 Code: 00 48 8b 74 24 10 31 d2 4c 89 e7 e8 24 b1 17 00 31 ff 89 c6 89 44 24 10 e8 37 df 1d fe 8b 44 24 10 85 c0 74 26 e8 0a e3 1d fe <0f> 0b e8 03 e3 1d fe 48 89 ee 48 c7 c7 fa ff ff ff c6 44 24 58 01 RSP: 0018:ffffc90011b2f330 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff888021913d80 RCX: ffffc9000ae22000 RDX: 0000000000040000 RSI: ffffffff8366fc66 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 000000000002abd8 R12: ffff8880a3a869d8 R13: 1ffff92002365e6a R14: 0000000000000001 R15: ffff888090db8000 FS: 00007f669fdc9700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffeeff4d638 CR3: 00000000905d5000 CR4: 0000000000350ee0 Call Trace: btrfs_del_leaf+0x2bc/0x350 fs/btrfs/ctree.c:4536 btrfs_del_items+0x9fc/0xe40 fs/btrfs/ctree.c:4651 btrfs_truncate_inode_items+0x1843/0x22b0 fs/btrfs/inode-item.c:699 btrfs_truncate fs/btrfs/inode.c:8432 [inline] btrfs_setsize fs/btrfs/inode.c:5150 [inline] btrfs_setattr+0x7db/0x13e0 fs/btrfs/inode.c:5185 notify_change+0xb2c/0x1180 fs/attr.c:483 do_truncate+0x143/0x200 fs/open.c:66 handle_truncate fs/namei.c:3295 [inline] do_open fs/namei.c:3640 [inline] path_openat+0x2047/0x2710 fs/namei.c:3793 do_filp_open+0x1ba/0x410 fs/namei.c:3820 do_sys_openat2+0x160/0x1c0 fs/open.c:1407 do_sys_open fs/open.c:1422 [inline] __do_sys_creat fs/open.c:1498 [inline] __se_sys_creat fs/open.c:1492 [inline] __x64_sys_creat+0xcd/0x120 fs/open.c:1492 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f669f08c389 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f669fdc9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f669f1abf80 RCX: 00007f669f08c389 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200000c0 RBP: 00007f669fdc91d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffd428804df R14: 00007f669fdc9300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0x266/0xb40 fs/btrfs/extent-tree.c:3252 Code: 00 48 8b 74 24 10 31 d2 4c 89 e7 e8 24 b1 17 00 31 ff 89 c6 89 44 24 10 e8 37 df 1d fe 8b 44 24 10 85 c0 74 26 e8 0a e3 1d fe <0f> 0b e8 03 e3 1d fe 48 89 ee 48 c7 c7 fa ff ff ff c6 44 24 58 01 RSP: 0018:ffffc90011b2f330 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff888021913d80 RCX: ffffc9000ae22000 RDX: 0000000000040000 RSI: ffffffff8366fc66 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 000000000002abd8 R12: ffff8880a3a869d8 R13: 1ffff92002365e6a R14: 0000000000000001 R15: ffff888090db8000 FS: 00007f669fdc9700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffeeff4d638 CR3: 00000000905d5000 CR4: 0000000000350ee0