------------[ cut here ]------------ WARNING: CPU: 0 PID: 8570 at fs/bcachefs/btree_iter.c:3194 __bch2_trans_kmalloc+0x4cc/0x96c fs/bcachefs/btree_iter.c:3194 Modules linked in: CPU: 0 UID: 0 PID: 8570 Comm: syz.5.307 Not tainted 6.16.0-rc7-syzkaller-g82af5ea7c611 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/18/2025 pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : __bch2_trans_kmalloc+0x4cc/0x96c fs/bcachefs/btree_iter.c:3194 lr : __bch2_trans_kmalloc+0x4cc/0x96c fs/bcachefs/btree_iter.c:3194 sp : ffff80009c845f10 x29: ffff80009c845f40 x28: dfff800000000000 x27: 1fffe000204d4800 x26: 0000000000010000 x25: ffff0001026a4034 x24: ffff0001026a4030 x23: 1fffe000204d4806 x22: 000000000000002f x21: 0000000000020000 x20: ada98000827917b8 x19: ffff0001026a4000 x18: 00000000ffffffff x17: ffff800093376000 x16: ffff80008af01d78 x15: 0000000000000001 x14: 1ffff00013908c14 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000080000 x10: 000000000007ffff x9 : ffff8000a3f49000 x8 : 0000000000080000 x7 : 0000000000000003 x6 : 0000000000000001 x5 : 0000000000000001 x4 : ffff80009c846390 x3 : ffff0000fc51dbc0 x2 : ffff8000827916f8 x1 : 0000000000020000 x0 : 0000000000010000 Call trace: __bch2_trans_kmalloc+0x4cc/0x96c fs/bcachefs/btree_iter.c:3194 (P) bch2_trans_kmalloc_nomemzero_ip fs/bcachefs/btree_iter.h:586 [inline] bch2_trans_kmalloc_nomemzero+0xe4/0x13c fs/bcachefs/btree_iter.h:621 bch2_alloc_sectors_start_trans+0x78/0x1880 fs/bcachefs/alloc_foreground.c:1251 __bch2_btree_node_alloc fs/bcachefs/btree_update_interior.c:320 [inline] bch2_btree_reserve_get+0x4ec/0xe80 fs/bcachefs/btree_update_interior.c:534 bch2_btree_update_start+0x15b4/0x1ab8 fs/bcachefs/btree_update_interior.c:1289 bch2_btree_split_leaf+0x118/0x71c fs/bcachefs/btree_update_interior.c:1921 bch2_trans_commit_error+0x17c/0x11a0 fs/bcachefs/btree_trans_commit.c:914 __bch2_trans_commit+0x17a4/0x625c fs/bcachefs/btree_trans_commit.c:1104 bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline] bch2_reconstruct_snapshots+0x13a0/0x1928 fs/bcachefs/snapshot.c:1017 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline] __bch2_run_recovery_passes+0x29c/0xd18 fs/bcachefs/recovery_passes.c:539 bch2_run_recovery_passes+0x174/0x1f4 fs/bcachefs/recovery_passes.c:610 bch2_fs_recovery+0x1c34/0x2fb4 fs/bcachefs/recovery.c:1016 bch2_fs_start+0x940/0xbec fs/bcachefs/super.c:1213 bch2_fs_get_tree+0x880/0x107c fs/bcachefs/fs.c:2488 vfs_get_tree+0x90/0x28c fs/super.c:1804 do_new_mount+0x228/0x814 fs/namespace.c:3902 path_mount+0x5b4/0xde0 fs/namespace.c:4226 do_mount fs/namespace.c:4239 [inline] __do_sys_mount fs/namespace.c:4450 [inline] __se_sys_mount fs/namespace.c:4427 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4427 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 irq event stamp: 68942 hardirqs last enabled at (68941): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (68941): [] _raw_spin_unlock_irqrestore+0x38/0x98 kernel/locking/spinlock.c:194 hardirqs last disabled at (68942): [] el1_brk64+0x1c/0x48 arch/arm64/kernel/entry-common.c:574 softirqs last enabled at (66046): [] softirq_handle_end kernel/softirq.c:425 [inline] softirqs last enabled at (66046): [] handle_softirqs+0xaf8/0xc88 kernel/softirq.c:607 softirqs last disabled at (66031): [] __do_softirq+0x14/0x20 kernel/softirq.c:613 ---[ end trace 0000000000000000 ]--- bcachefs (loop5): bch2_btree_update_start(): error ENOMEM_trans_kmalloc bcachefs (loop5): bch2_reconstruct_snapshots(): error ENOMEM_trans_kmalloc bcachefs (loop5): error in recovery: ENOMEM_trans_kmalloc emergency read only at seq 19 bcachefs (loop5): bch2_fs_start(): error starting filesystem ENOMEM_trans_kmalloc bcachefs (loop5): shutting down bcachefs (loop5): shutdown complete bcachefs: bch2_fs_get_tree() error: ENOMEM_trans_kmalloc