R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 000000000000000b R14: 00007fdf3699bf80 R15: 00007ffce7b8c1f8 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-io-tree.c:560! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 5536 Comm: syz-executor.0 Not tainted 6.7.0-rc3-syzkaller-00284-g815fb87b7530 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 RIP: 0010:clear_state_bit+0x32b/0x330 fs/btrfs/extent-io-tree.c:560 Code: fe e9 98 fd ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c c5 fe ff ff 4c 89 ef e8 c0 1f 2f fe e9 b8 fe ff ff e8 f6 17 d3 fd 90 <0f> 0b 0f 1f 00 66 0f 1f 00 55 41 57 41 56 41 55 41 54 53 48 83 ec RSP: 0018:ffffc9000592f470 EFLAGS: 00010293 RAX: ffffffff83bb624a RBX: 00000000fffffff4 RCX: ffff888025709dc0 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffff83bb6073 R09: 00000000ffffffff R10: dffffc0000000000 R11: fffffbfff1b4559b R12: ffff88807ab34cc0 R13: ffffc9000592f678 R14: 0000000000000800 R15: dffffc0000000000 FS: 00007fdf376826c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020009000 CR3: 0000000024ea8000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __clear_extent_bit+0x52b/0xb10 fs/btrfs/extent-io-tree.c:731 clear_record_extent_bits+0x4d/0x80 fs/btrfs/extent-io-tree.c:1805 __btrfs_qgroup_release_data+0x5cc/0xaa0 fs/btrfs/qgroup.c:4133 btrfs_invalidate_folio+0x7cf/0xad0 fs/btrfs/inode.c:8062 folio_invalidate mm/truncate.c:158 [inline] truncate_cleanup_folio+0x106/0x3d0 mm/truncate.c:178 truncate_inode_pages_range+0x2b6/0xf70 mm/truncate.c:367 truncate_inode_pages mm/truncate.c:448 [inline] truncate_pagecache mm/truncate.c:741 [inline] truncate_setsize+0xcf/0xf0 mm/truncate.c:766 btrfs_setsize fs/btrfs/inode.c:5013 [inline] btrfs_setattr+0x605/0x11a0 fs/btrfs/inode.c:5052 notify_change+0xb99/0xe60 fs/attr.c:499 do_truncate+0x220/0x300 fs/open.c:66 do_sys_ftruncate+0x2f3/0x390 fs/open.c:194 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fdf3687cae9 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:00007fdf376820c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007fdf3699bf80 RCX: 00007fdf3687cae9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007fdf37682120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 000000000000000b R14: 00007fdf3699bf80 R15: 00007ffce7b8c1f8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:clear_state_bit+0x32b/0x330 fs/btrfs/extent-io-tree.c:560 Code: fe e9 98 fd ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c c5 fe ff ff 4c 89 ef e8 c0 1f 2f fe e9 b8 fe ff ff e8 f6 17 d3 fd 90 <0f> 0b 0f 1f 00 66 0f 1f 00 55 41 57 41 56 41 55 41 54 53 48 83 ec RSP: 0018:ffffc9000592f470 EFLAGS: 00010293 RAX: ffffffff83bb624a RBX: 00000000fffffff4 RCX: ffff888025709dc0 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffff83bb6073 R09: 00000000ffffffff R10: dffffc0000000000 R11: fffffbfff1b4559b R12: ffff88807ab34cc0 R13: ffffc9000592f678 R14: 0000000000000800 R15: dffffc0000000000 FS: 00007fdf376826c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020009000 CR3: 0000000024ea8000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400