el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-io-tree.c:397! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 11165 Comm: syz-executor.3 Not tainted 6.7.0-rc3-syzkaller-g2cc14f52aeb7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : set_state_bits fs/btrfs/extent-io-tree.c:397 [inline] pc : insert_state+0x9a4/0x9a8 fs/btrfs/extent-io-tree.c:427 lr : set_state_bits fs/btrfs/extent-io-tree.c:397 [inline] lr : insert_state+0x9a4/0x9a8 fs/btrfs/extent-io-tree.c:427 sp : ffff8000986d66c0 x29: ffff8000986d6710 x28: ffff0000df611c98 x27: dfff800000000000 x26: 0000000000000000 x25: ffff0000d5224a80 x24: 0000000000000000 x23: 0000000000000fff x22: 0000000000000000 x21: 0000000000000800 x20: 0000000000000fff x19: 00000000fffffff4 x18: ffff8000986d5be0 x17: 0000000000000000 x16: ffff80008a825660 x15: 0000000000000001 x14: 1ffff00011cf3e1a x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000040000 x10: 000000000003ffff x9 : ffff80009cd8a000 x8 : 0000000000040000 x7 : 0000000000000001 x6 : 0000000000000001 x5 : 00000000ffffffff x4 : 0000000000000820 x3 : 0000000000000820 x2 : 0000000000000038 x1 : 00000000fffffff4 x0 : 0000000000000000 Call trace: set_state_bits fs/btrfs/extent-io-tree.c:397 [inline] insert_state+0x9a4/0x9a8 fs/btrfs/extent-io-tree.c:427 __set_extent_bit+0xf04/0x1968 fs/btrfs/extent-io-tree.c:1200 set_record_extent_bits+0x68/0xa8 fs/btrfs/extent-io-tree.c:1793 qgroup_reserve_data+0x214/0x874 fs/btrfs/qgroup.c:4005 btrfs_qgroup_reserve_data+0x40/0xd8 fs/btrfs/qgroup.c:4048 btrfs_check_data_free_space+0x130/0x20c fs/btrfs/delalloc-space.c:154 btrfs_delalloc_reserve_space+0x4c/0x1ec fs/btrfs/delalloc-space.c:465 btrfs_page_mkwrite+0x368/0xcbc fs/btrfs/inode.c:8132 do_page_mkwrite+0x140/0x2dc mm/memory.c:2943 wp_page_shared mm/memory.c:3338 [inline] do_wp_page+0x1214/0x33ac mm/memory.c:3478 handle_pte_fault mm/memory.c:5054 [inline] __handle_mm_fault mm/memory.c:5179 [inline] handle_mm_fault+0x1254/0x49f8 mm/memory.c:5344 __do_page_fault arch/arm64/mm/fault.c:513 [inline] do_page_fault+0x4e8/0xa54 arch/arm64/mm/fault.c:626 do_mem_abort+0x74/0x200 arch/arm64/mm/fault.c:846 el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:398 el1h_64_sync_handler+0x60/0xac arch/arm64/kernel/entry-common.c:458 el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:590 __arch_copy_to_user+0x190/0x234 arch/arm64/lib/copy_template.S:158 copy_page_to_iter+0x200/0x2f8 lib/iov_iter.c:381 copy_folio_to_iter include/linux/uio.h:181 [inline] filemap_read+0x698/0xbf8 mm/filemap.c:2644 btrfs_file_read_iter+0x240/0x5b0 fs/btrfs/file.c:3823 do_iter_read+0x668/0xa80 fs/read_write.c:795 vfs_readv fs/read_write.c:915 [inline] do_preadv+0x1e4/0x324 fs/read_write.c:1007 __do_sys_preadv fs/read_write.c:1057 [inline] __se_sys_preadv fs/read_write.c:1052 [inline] __arm64_sys_preadv+0xa0/0xb8 fs/read_write.c:1052 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 Code: aa1403e0 979740d2 17ffff4d 97843b82 (d4210000) ---[ end trace 0000000000000000 ]---