RDX: 0000000020000100 RSI: 0000000040305829 RDI: 0000000000000005 RBP: 00007ffefa85bdd0 R08: 0000000000000001 R09: 00007ffefa85bde0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00007ffefa85be10 R14: 00007ffefa85bdf0 R15: 0000000000000002 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-io-tree.c:515! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 5045 Comm: syz-executor310 Not tainted 6.4.0-rc7-syzkaller-00072-gdad9774deaf1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 RIP: 0010:clear_state_bit+0x31b/0x3a0 fs/btrfs/extent-io-tree.c:515 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 ee 41 f8 fd 0f 0b eb 97 e8 e5 41 f8 fd <0f> 0b 4c 89 f7 e8 3b 16 4a fe e9 72 fd ff ff 4c 89 f7 e8 2e 16 4a RSP: 0018:ffffc900035bece8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000fffffff4 RCX: 0000000000000000 RDX: ffff8880797de080 RSI: ffffffff838b25fb RDI: 0000000000000005 RBP: ffff888029424e40 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000001 R12: ffff888071f1e300 R13: 0000000000000000 R14: ffff888029424ebc R15: 000000000000ffff FS: 0000555555e9e300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020010000 CR3: 000000002bb0a000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __clear_extent_bit+0x560/0xba0 fs/btrfs/extent-io-tree.c:674 clear_record_extent_bits+0x58/0x90 fs/btrfs/extent-io-tree.c:1703 __btrfs_qgroup_release_data+0x19b/0x8f0 fs/btrfs/qgroup.c:3910 btrfs_alloc_ordered_extent+0x76c/0x1000 fs/btrfs/ordered-data.c:193 btrfs_add_ordered_extent+0x49/0xa0 fs/btrfs/ordered-data.c:278 cow_file_range+0x4c0/0xd30 fs/btrfs/inode.c:1314 btrfs_run_delalloc_range+0x53e/0x12d0 fs/btrfs/inode.c:2244 writepage_delalloc+0x1a6/0x3e0 fs/btrfs/extent_io.c:1330 __extent_writepage+0xf8d/0x15e0 fs/btrfs/extent_io.c:1609 extent_write_cache_pages+0x465/0xd10 fs/btrfs/extent_io.c:2477 extent_writepages+0x20c/0x4a0 fs/btrfs/extent_io.c:2599 do_writepages+0x1a8/0x640 mm/page-writeback.c:2551 filemap_fdatawrite_wbc mm/filemap.c:390 [inline] filemap_fdatawrite_wbc+0x147/0x1b0 mm/filemap.c:380 __filemap_fdatawrite_range+0xb8/0xf0 mm/filemap.c:423 btrfs_fdatawrite_range+0x4a/0x110 fs/btrfs/file.c:3862 btrfs_wait_ordered_range+0x75/0x290 fs/btrfs/ordered-data.c:802 btrfs_punch_hole fs/btrfs/file.c:2609 [inline] btrfs_fallocate+0xab6/0x27f0 fs/btrfs/file.c:3063 vfs_fallocate+0x48b/0xe40 fs/open.c:324 ioctl_preallocate+0x18e/0x200 fs/ioctl.c:290 file_ioctl fs/ioctl.c:333 [inline] do_vfs_ioctl+0x1306/0x1670 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:0x7f7c617abac9 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:00007ffefa85bda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f7c617abac9 RDX: 0000000020000100 RSI: 0000000040305829 RDI: 0000000000000005 RBP: 00007ffefa85bdd0 R08: 0000000000000001 R09: 00007ffefa85bde0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00007ffefa85be10 R14: 00007ffefa85bdf0 R15: 0000000000000002 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:clear_state_bit+0x31b/0x3a0 fs/btrfs/extent-io-tree.c:515 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 ee 41 f8 fd 0f 0b eb 97 e8 e5 41 f8 fd <0f> 0b 4c 89 f7 e8 3b 16 4a fe e9 72 fd ff ff 4c 89 f7 e8 2e 16 4a RSP: 0018:ffffc900035bece8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000fffffff4 RCX: 0000000000000000 RDX: ffff8880797de080 RSI: ffffffff838b25fb RDI: 0000000000000005 RBP: ffff888029424e40 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000001 R12: ffff888071f1e300 R13: 0000000000000000 R14: ffff888029424ebc R15: 000000000000ffff FS: 0000555555e9e300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020010000 CR3: 000000002bb0a000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400