NILFS (loop2): nilfs_get_block (ino=16): a race condition while inserting a data block at offset=7 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 6826 at fs/nilfs2/dat.c:158 nilfs_dat_prepare_end+0x2ac/0x2f4 fs/nilfs2/dat.c:158 Modules linked in: CPU: 1 PID: 6826 Comm: syz-executor.2 Not tainted 6.1.76-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : nilfs_dat_prepare_end+0x2ac/0x2f4 fs/nilfs2/dat.c:158 lr : nilfs_dat_prepare_end+0x2ac/0x2f4 fs/nilfs2/dat.c:158 sp : ffff8000200c66b0 x29: ffff8000200c66c0 x28: 1fffe00022f3f5a7 x27: dfff800000000000 x26: 0000000000000000 x25: dfff800000000000 x24: ffff0001179fad00 x23: 1fffe00022f3f5a3 x22: 00000000fffffffe x21: ffff00011a3f0158 x20: ffff0001179fad18 x19: ffff0001179fad30 x18: ffff00011a3f0008 x17: ffff8000188c8000 x16: ffff80001214eb7c x15: 0000000000000002 x14: 00000000ffffffef x13: ffff00011b7a3780 x12: 0000000000040000 x11: 000000000003ffff x10: ffff800020a29000 x9 : ffff800009da96b0 x8 : 0000000000040000 x7 : ffff800008062348 x6 : ffff800008062558 x5 : ffff000123892698 x4 : ffff8000200c5f20 x3 : ffff800008b312e8 x2 : 0000000000000001 x1 : 00000000fffffffe x0 : 00000000fffffffe Call trace: nilfs_dat_prepare_end+0x2ac/0x2f4 fs/nilfs2/dat.c:158 nilfs_dat_prepare_update+0x30/0xf4 fs/nilfs2/dat.c:230 nilfs_btree_prepare_update_v+0x190/0x378 fs/nilfs2/btree.c:1919 nilfs_btree_prepare_propagate_v fs/nilfs2/btree.c:1987 [inline] nilfs_btree_propagate_v fs/nilfs2/btree.c:2040 [inline] nilfs_btree_propagate+0x668/0xe90 fs/nilfs2/btree.c:2097 nilfs_bmap_propagate+0x7c/0x130 fs/nilfs2/bmap.c:345 nilfs_collect_file_data+0x54/0xe8 fs/nilfs2/segment.c:587 nilfs_segctor_apply_buffers+0x170/0x31c fs/nilfs2/segment.c:1047 nilfs_segctor_scan_file_dsync fs/nilfs2/segment.c:1136 [inline] nilfs_segctor_collect_blocks fs/nilfs2/segment.c:1290 [inline] nilfs_segctor_collect fs/nilfs2/segment.c:1532 [inline] nilfs_segctor_do_construct+0x1424/0x6550 fs/nilfs2/segment.c:2080 nilfs_construct_dsync_segment+0x438/0x51c fs/nilfs2/segment.c:2345 nilfs_writepages+0xfc/0x154 fs/nilfs2/inode.c:170 do_writepages+0x2e8/0x56c mm/page-writeback.c:2469 filemap_fdatawrite_wbc+0x124/0x174 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] filemap_write_and_wait_range+0x17c/0x268 mm/filemap.c:674 __generic_file_write_iter+0x27c/0x388 mm/filemap.c:3931 generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:3977 do_iter_write+0x534/0x964 fs/read_write.c:861 vfs_iter_write+0x88/0xac fs/read_write.c:902 iter_file_splice_write+0x62c/0xc5c fs/splice.c:685 do_splice_from fs/splice.c:763 [inline] direct_splice_actor+0xe4/0x1c0 fs/splice.c:950 splice_direct_to_actor+0x3c4/0x9b4 fs/splice.c:896 do_splice_direct+0x20c/0x348 fs/splice.c:1002 do_sendfile+0x4bc/0xc70 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1323 [inline] __se_sys_sendfile64 fs/read_write.c:1309 [inline] __arm64_sys_sendfile64+0x160/0x3b4 fs/read_write.c:1309 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 irq event stamp: 9602 hardirqs last enabled at (9601): [] kasan_quarantine_put+0xdc/0x204 mm/kasan/quarantine.c:242 hardirqs last disabled at (9602): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405 softirqs last enabled at (9092): [] softirq_handle_end kernel/softirq.c:414 [inline] softirqs last enabled at (9092): [] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600 softirqs last disabled at (8849): [] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:79 ---[ end trace 0000000000000000 ]---