el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 20431 at fs/btrfs/file.c:2958 btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958 Modules linked in: CPU: 1 PID: 20431 Comm: syz-executor.3 Not tainted 5.15.124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958 lr : btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958 sp : ffff80001f906f00 x29: ffff80001f907060 x28: ffff0000c23ad300 x27: 0000000000000000 x26: dfff800000000000 x25: ffff0000dbe7b630 x24: ffff00011d39c4b0 x23: 000000000000ffff x22: 00000000fffffff4 x21: 0000000000000000 x20: 1fffe0001b7cf6d1 x19: ffff0000dbe7b688 x18: 0000000000000001 x17: ff80800008334f90 x16: ffff80001195ce44 x15: ffff800008334f90 x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000040000 x11: 000000000003ffff x10: ffff80001deab000 x9 : 4d2cafaad118c800 x8 : 4d2cafaad118c800 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80001f906678 x4 : ffff8000149dfca0 x3 : ffff80000854c75c x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026 Call trace: btrfs_replace_file_extents+0xe1c/0x1388 fs/btrfs/file.c:2958 insert_prealloc_file_extent fs/btrfs/inode.c:10336 [inline] __btrfs_prealloc_file_range+0x5ac/0x1164 fs/btrfs/inode.c:10404 btrfs_prealloc_file_range+0x60/0x7c fs/btrfs/inode.c:10494 btrfs_zero_range+0xd58/0xfd8 fs/btrfs/file.c:3400 btrfs_fallocate+0xb4c/0x1954 fs/btrfs/file.c:3515 vfs_fallocate+0x478/0x5b4 fs/open.c:308 ioctl_preallocate+0x2a0/0x34c fs/ioctl.c:294 do_vfs_ioctl+0x1d00/0x2a38 fs/ioctl.c:853 __do_sys_ioctl fs/ioctl.c:872 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0xe4/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 irq event stamp: 83626 hardirqs last enabled at (83625): [] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257 hardirqs last disabled at (83626): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:387 softirqs last enabled at (83596): [] softirq_handle_end kernel/softirq.c:401 [inline] softirqs last enabled at (83596): [] __do_softirq+0xb5c/0xe20 kernel/softirq.c:587 softirqs last disabled at (83555): [] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] softirqs last disabled at (83555): [] invoke_softirq kernel/softirq.c:439 [inline] softirqs last disabled at (83555): [] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636 ---[ end trace 4790aada670e0596 ]--- BTRFS: error (device loop3) in btrfs_replace_file_extents:2958: errno=-12 Out of memory BTRFS info (device loop3): forced readonly