------------[ cut here ]------------ truncate spotted in mem i_size < btree i_size: 1 < 33554432 WARNING: CPU: 0 PID: 8706 at fs/bcachefs/fs-io.c:437 bchfs_truncate+0x93c/0xa74 fs/bcachefs/fs-io.c:434 Modules linked in: CPU: 0 PID: 8706 Comm: syz-executor.3 Not tainted 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : bchfs_truncate+0x93c/0xa74 fs/bcachefs/fs-io.c:434 lr : bchfs_truncate+0x93c/0xa74 fs/bcachefs/fs-io.c:434 sp : ffff8000983a7320 x29: ffff8000983a7500 x28: 0000000000000001 x27: 0000000002000000 x26: ffff0000f0bcba20 x25: ffff8000983a7670 x24: ffff700013074e78 x23: ffff800091f7c000 x22: ffff0000f0bcb920 x21: ffff0000f0bcb408 x20: dfff800000000000 x19: ffff0000f0bcb3d8 x18: 1fffe000367b8996 x17: ffff80008eead000 x16: ffff800080333944 x15: 0000000000000001 x14: 1fffe000367bb590 x13: 0000000000000000 x12: 0000000000000003 x11: 0000000000000001 x10: 0000000000000003 x9 : 111ac16adf2f0300 x8 : 111ac16adf2f0300 x7 : ffff8000802aa2c0 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000006 x1 : ffff80008afffb40 x0 : ffff800124fc3000 Call trace: bchfs_truncate+0x93c/0xa74 fs/bcachefs/fs-io.c:434 bch2_setattr+0x198/0x230 fs/bcachefs/fs.c:882 notify_change+0x9d4/0xc84 fs/attr.c:497 do_truncate+0x1c0/0x28c fs/open.c:65 handle_truncate fs/namei.c:3300 [inline] do_open fs/namei.c:3646 [inline] path_openat+0x2170/0x2830 fs/namei.c:3799 do_filp_open+0x1bc/0x3cc fs/namei.c:3826 do_sys_openat2+0x124/0x1b8 fs/open.c:1406 do_sys_open fs/open.c:1421 [inline] __do_sys_openat fs/open.c:1437 [inline] __se_sys_openat fs/open.c:1432 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1432 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 irq event stamp: 262 hardirqs last enabled at (261): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1399 [inline] hardirqs last enabled at (261): [] finish_lock_switch+0xbc/0x1e4 kernel/sched/core.c:5163 hardirqs last disabled at (262): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:470 softirqs last enabled at (244): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (244): [] handle_softirqs+0xa60/0xc34 kernel/softirq.c:582 softirqs last disabled at (129): [] __do_softirq+0x14/0x20 kernel/softirq.c:588 ---[ end trace 0000000000000000 ]---