Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd74f1df08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f83c0c1caa9 RDX: 0000000020000100 RSI: 0000000040305829 RDI: 0000000000000005 RBP: 00007ffd74f1df30 R08: 0000000000000001 R09: 00007ffd74f1df40 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00007ffd74f1df70 R14: 00007ffd74f1df50 R15: 0000000000000003 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-io-tree.c:517! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 3696 Comm: syz-executor322 Not tainted 6.1.0-rc8-syzkaller-00152-g3ecc37918c80 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:clear_state_bit+0x31d/0x3a0 fs/btrfs/extent-io-tree.c:517 Code: 14 02 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 33 44 8b 7d 7c e9 af fe ff ff e8 ec ae fb fd 0f 0b eb 97 e8 e3 ae fb fd <0f> 0b 4c 89 f7 e8 e9 88 48 fe e9 72 fd ff ff 4c 89 f7 e8 dc 88 48 RSP: 0018:ffffc9000415eca8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000fffffff4 RCX: 0000000000000000 RDX: ffff888075d457c0 RSI: ffffffff83846f1d RDI: 0000000000000005 RBP: ffff88807e64f780 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000000 R12: ffff888070493a80 R13: 0000000000000000 R14: ffff88807e64f7fc R15: 000000000000efff FS: 0000555555e3d300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2eb68b4050 CR3: 00000000286db000 CR4: 0000000000350ee0 Call Trace: __clear_extent_bit+0x578/0xca0 fs/btrfs/extent-io-tree.c:674 clear_record_extent_bits+0x5c/0x70 fs/btrfs/extent-io-tree.c:1614 __btrfs_qgroup_release_data+0x1a2/0xa40 fs/btrfs/qgroup.c:3863 btrfs_add_ordered_extent+0x9d6/0x1020 fs/btrfs/ordered-data.c:188 cow_file_range+0x50f/0xd10 fs/btrfs/inode.c:1299 btrfs_run_delalloc_range+0x578/0x12c0 fs/btrfs/inode.c:2229 writepage_delalloc+0x1a6/0x3e0 fs/btrfs/extent_io.c:1968 __extent_writepage+0xffd/0x1550 fs/btrfs/extent_io.c:2272 extent_write_cache_pages+0x614/0x16b0 fs/btrfs/extent_io.c:3186 extent_writepages+0x1d8/0x460 fs/btrfs/extent_io.c:3308 do_writepages+0x1af/0x690 mm/page-writeback.c:2469 filemap_fdatawrite_wbc mm/filemap.c:388 [inline] filemap_fdatawrite_wbc+0x147/0x1b0 mm/filemap.c:378 __filemap_fdatawrite_range+0xb8/0xf0 mm/filemap.c:421 btrfs_fdatawrite_range+0x4a/0x110 fs/btrfs/file.c:4155 btrfs_wait_ordered_range+0x75/0x2a0 fs/btrfs/ordered-data.c:774 btrfs_punch_hole fs/btrfs/file.c:2913 [inline] btrfs_fallocate+0xabe/0x27c0 fs/btrfs/file.c:3367 vfs_fallocate+0x48b/0xe00 fs/open.c:323 ioctl_preallocate+0x18e/0x200 fs/ioctl.c:290 file_ioctl fs/ioctl.c:333 [inline] do_vfs_ioctl+0x1306/0x1600 fs/ioctl.c:849 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x10c/0x210 fs/ioctl.c:856 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:0x7f83c0c1caa9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd74f1df08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f83c0c1caa9 RDX: 0000000020000100 RSI: 0000000040305829 RDI: 0000000000000005 RBP: 00007ffd74f1df30 R08: 0000000000000001 R09: 00007ffd74f1df40 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00007ffd74f1df70 R14: 00007ffd74f1df50 R15: 0000000000000003 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:clear_state_bit+0x31d/0x3a0 fs/btrfs/extent-io-tree.c:517 Code: 14 02 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 33 44 8b 7d 7c e9 af fe ff ff e8 ec ae fb fd 0f 0b eb 97 e8 e3 ae fb fd <0f> 0b 4c 89 f7 e8 e9 88 48 fe e9 72 fd ff ff 4c 89 f7 e8 dc 88 48 RSP: 0018:ffffc9000415eca8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000fffffff4 RCX: 0000000000000000 RDX: ffff888075d457c0 RSI: ffffffff83846f1d RDI: 0000000000000005 RBP: ffff88807e64f780 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000000 R12: ffff888070493a80 R13: 0000000000000000 R14: ffff88807e64f7fc R15: 000000000000efff FS: 0000555555e3d300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2eb68b4050 CR3: 00000000286db000 CR4: 0000000000350ee0 ---------------- Code disassembly (best guess): 0: 28 00 sub %al,(%rax) 2: 00 00 add %al,(%rax) 4: 75 05 jne 0xb 6: 48 83 c4 28 add $0x28,%rsp a: c3 retq b: e8 11 15 00 00 callq 0x1521 10: 90 nop 11: 48 89 f8 mov %rdi,%rax 14: 48 89 f7 mov %rsi,%rdi 17: 48 89 d6 mov %rdx,%rsi 1a: 48 89 ca mov %rcx,%rdx 1d: 4d 89 c2 mov %r8,%r10 20: 4d 89 c8 mov %r9,%r8 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9 28: 0f 05 syscall * 2a: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction 30: 73 01 jae 0x33 32: c3 retq 33: 48 c7 c1 c0 ff ff ff mov $0xffffffffffffffc0,%rcx 3a: f7 d8 neg %eax 3c: 64 89 01 mov %eax,%fs:(%rcx) 3f: 48 rex.W