RAX: ffffffffffffffda RBX: 00007f70771ac050 RCX: 00007f707708c169 RDX: 0000000000000000 RSI: 000000000000000c RDI: 0000000000000009 RBP: 00007f706e7dd1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0001000000201004 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffe6c07bf4f R14: 00007f706e7dd300 R15: 0000000000022000 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-io-tree.c:515! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 6081 Comm: syz-executor.1 Not tainted 6.3.0-rc7-syzkaller-00189-g2caeeb9d4a1b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 RIP: 0010:clear_state_bit+0x328/0x330 fs/btrfs/extent-io-tree.c:515 Code: 34 fe e9 9a fd ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c c7 fe ff ff 4c 89 ef e8 d2 95 34 fe e9 ba fe ff ff e8 48 cf de fd <0f> 0b 66 0f 1f 44 00 00 f3 0f 1e fa 55 48 89 e5 41 57 41 56 41 55 RSP: 0018:ffffc900057de010 EFLAGS: 00010246 RAX: ffffffff83abaa48 RBX: 00000000fffffff4 RCX: 0000000000040000 RDX: ffffc900118f3000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: 0000000000002000 R08: ffffffff83aba873 R09: fffffbfff1a02bab R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88802ba39840 R13: ffffc900057de218 R14: 0000000000000800 R15: dffffc0000000000 FS: 00007f706e7dd700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f706e7dcff8 CR3: 000000002afdd000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __clear_extent_bit+0x929/0xb20 fs/btrfs/extent-io-tree.c:668 clear_record_extent_bits+0x52/0x80 fs/btrfs/extent-io-tree.c:1703 __btrfs_qgroup_release_data+0x4a4/0xa60 fs/btrfs/qgroup.c:3910 btrfs_add_ordered_extent+0xe2/0xc20 fs/btrfs/ordered-data.c:191 cow_file_range+0x764/0xfe0 fs/btrfs/inode.c:1320 fallback_to_cow+0x5b6/0x980 fs/btrfs/inode.c:1774 run_delalloc_nocow+0xb2d/0x1500 fs/btrfs/inode.c:2091 btrfs_run_delalloc_range+0x3ab/0x11d0 fs/btrfs/inode.c:2241 writepage_delalloc+0x261/0x590 fs/btrfs/extent_io.c:1424 __extent_writepage+0x850/0x16d0 fs/btrfs/extent_io.c:1724 extent_write_cache_pages fs/btrfs/extent_io.c:2635 [inline] extent_writepages+0xc31/0x1930 fs/btrfs/extent_io.c:2755 do_writepages+0x3a6/0x670 mm/page-writeback.c:2551 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:390 __filemap_fdatawrite_range mm/filemap.c:423 [inline] filemap_write_and_wait_range+0x1d4/0x2c0 mm/filemap.c:678 __iomap_dio_rw+0xae6/0x20d0 fs/iomap/direct-io.c:566 btrfs_dio_write+0xbc/0x110 fs/btrfs/inode.c:7803 btrfs_direct_write fs/btrfs/file.c:1529 [inline] btrfs_do_write_iter+0x86f/0x1270 fs/btrfs/file.c:1674 do_iter_write+0x6ea/0xc50 fs/read_write.c:861 iter_file_splice_write+0x843/0xfe0 fs/splice.c:778 do_splice_from fs/splice.c:856 [inline] direct_splice_actor+0xe7/0x1c0 fs/splice.c:1022 splice_direct_to_actor+0x4c4/0xbd0 fs/splice.c:977 do_splice_direct+0x283/0x3d0 fs/splice.c:1065 do_sendfile+0x620/0xff0 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1323 [inline] __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1309 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f707708c169 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:00007f706e7dd168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f70771ac050 RCX: 00007f707708c169 RDX: 0000000000000000 RSI: 000000000000000c RDI: 0000000000000009 RBP: 00007f706e7dd1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0001000000201004 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffe6c07bf4f R14: 00007f706e7dd300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:clear_state_bit+0x328/0x330 fs/btrfs/extent-io-tree.c:515 Code: 34 fe e9 9a fd ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c c7 fe ff ff 4c 89 ef e8 d2 95 34 fe e9 ba fe ff ff e8 48 cf de fd <0f> 0b 66 0f 1f 44 00 00 f3 0f 1e fa 55 48 89 e5 41 57 41 56 41 55 RSP: 0018:ffffc900057de010 EFLAGS: 00010246 RAX: ffffffff83abaa48 RBX: 00000000fffffff4 RCX: 0000000000040000 RDX: ffffc900118f3000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: 0000000000002000 R08: ffffffff83aba873 R09: fffffbfff1a02bab R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88802ba39840 R13: ffffc900057de218 R14: 0000000000000800 R15: dffffc0000000000 FS: 00007f706e7dd700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f706e7dcff8 CR3: 000000002afdd000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400