NILFS (loop3): nilfs_get_block (ino=16): a race condition while inserting a data block at offset=7 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 15389 at fs/nilfs2/dat.c:158 nilfs_dat_prepare_end+0x2ac/0x2f4 fs/nilfs2/dat.c:158 Modules linked in: CPU: 1 PID: 15389 Comm: syz-executor.3 Not tainted 5.15.148-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 : ffff80001efd6630 x29: ffff80001efd6640 x28: 1fffe00024295c37 x27: dfff800000000000 x26: 0000000000000000 x25: dfff800000000000 x24: ffff0001214ae180 x23: 1fffe00024295c33 x22: 00000000fffffffe x21: ffff00011bc60158 x20: ffff0001214ae198 x19: ffff0001214ae1b0 x18: 0000000000000000 x17: 0000000000000002 x16: ffff800009ca8998 x15: 00000000ffffffef x14: ffff0000c2279b40 x13: 0000000000ff0100 x12: 0000000000040000 x11: 000000000003ffff x10: ffff80001feba000 x9 : 0000000000040000 x8 : ffff800009cc2988 x7 : 0000000000000000 x6 : ffff80000805c7bc x5 : ffff000128e28408 x4 : 0000000000000000 x3 : ffff800008a6cecc 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:1921 nilfs_btree_prepare_propagate_v fs/nilfs2/btree.c:1989 [inline] nilfs_btree_propagate_v fs/nilfs2/btree.c:2042 [inline] nilfs_btree_propagate+0x66c/0xeb0 fs/nilfs2/btree.c:2099 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+0x14d8/0x6978 fs/nilfs2/segment.c:2080 nilfs_construct_dsync_segment+0x438/0x51c fs/nilfs2/segment.c:2347 nilfs_writepages+0xfc/0x154 fs/nilfs2/inode.c:170 do_writepages+0x39c/0x5ec mm/page-writeback.c:2364 filemap_fdatawrite_wbc+0x1c8/0x228 mm/filemap.c:400 __filemap_fdatawrite_range mm/filemap.c:433 [inline] filemap_write_and_wait_range+0x16c/0x244 mm/filemap.c:704 __generic_file_write_iter+0x344/0x454 mm/filemap.c:3898 generic_file_write_iter+0xb4/0x1b8 mm/filemap.c:3944 do_iter_readv_writev+0x420/0x5f8 do_iter_write+0x1b8/0x664 fs/read_write.c:855 vfs_iter_write+0x88/0xac fs/read_write.c:896 iter_file_splice_write+0x618/0xc48 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe4/0x1c0 fs/splice.c:936 splice_direct_to_actor+0x408/0x9a0 fs/splice.c:891 do_splice_direct+0x1f4/0x334 fs/splice.c:979 do_sendfile+0x4bc/0xc70 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64 fs/read_write.c:1303 [inline] __arm64_sys_sendfile64+0x160/0x408 fs/read_write.c:1303 __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:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 irq event stamp: 8372 hardirqs last enabled at (8371): [] kasan_quarantine_put+0xdc/0x204 mm/kasan/quarantine.c:231 hardirqs last disabled at (8372): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:396 softirqs last enabled at (8312): [] softirq_handle_end kernel/softirq.c:401 [inline] softirqs last enabled at (8312): [] __do_softirq+0xb5c/0xdb0 kernel/softirq.c:587 softirqs last disabled at (8213): [] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] softirqs last disabled at (8213): [] invoke_softirq kernel/softirq.c:439 [inline] softirqs last disabled at (8213): [] __irq_exit_rcu+0x264/0x4d4 kernel/softirq.c:637 ---[ end trace 1f4060d9a1e24ce3 ]---