NILFS (loop2): nilfs_get_block (ino=16): a race condition while inserting a data block at offset=6 NILFS (loop2): nilfs_get_block (ino=16): a race condition while inserting a data block at offset=7 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 16551 at fs/nilfs2/dat.c:158 nilfs_dat_prepare_end+0x248/0x2a0 Modules linked in: CPU: 0 PID: 16551 Comm: syz-executor.2 Not tainted 6.1.74-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 RIP: 0010:nilfs_dat_prepare_end+0x248/0x2a0 fs/nilfs2/dat.c:158 Code: c3 3d fe 89 eb 89 d8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 77 c3 3d fe e8 42 de b3 fd e9 5a ff ff ff e8 68 c3 3d fe <0f> 0b bb fe ff ff ff eb d2 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c RSP: 0018:ffffc90014d86a98 EFLAGS: 00010246 RAX: ffffffff834caf58 RBX: 00000000fffffffe RCX: 0000000000040000 RDX: ffffc900051a1000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: 1ffff1100fb92873 R08: ffffffff834caed1 R09: ffffffff834aecc7 R10: 0000000000000002 R11: ffff88807d803b80 R12: ffff88807dc94398 R13: ffff88809512c168 R14: ffff88807dc943b0 R15: dffffc0000000000 FS: 00007f22f24946c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555557198788 CR3: 0000000028690000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: nilfs_dat_prepare_update+0x1f/0xd0 fs/nilfs2/dat.c:230 nilfs_btree_prepare_update_v+0x1c5/0x450 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+0x3bb/0xde0 fs/nilfs2/btree.c:2097 nilfs_bmap_propagate+0x6d/0x120 fs/nilfs2/bmap.c:345 nilfs_collect_file_data+0x49/0xc0 fs/nilfs2/segment.c:587 nilfs_segctor_apply_buffers+0x180/0x330 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+0x18cd/0x6dd0 fs/nilfs2/segment.c:2080 nilfs_construct_dsync_segment+0x5c0/0x6c0 fs/nilfs2/segment.c:2345 do_writepages+0x3a2/0x670 mm/page-writeback.c:2469 filemap_fdatawrite_wbc+0x121/0x180 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] filemap_write_and_wait_range+0x1a4/0x290 mm/filemap.c:674 __generic_file_write_iter+0x2c4/0x400 mm/filemap.c:3931 generic_file_write_iter+0xab/0x310 mm/filemap.c:3977 do_iter_write+0x6e6/0xc50 fs/read_write.c:861 iter_file_splice_write+0x830/0xfc0 fs/splice.c:685 do_splice_from fs/splice.c:763 [inline] direct_splice_actor+0xe3/0x1c0 fs/splice.c:950 splice_direct_to_actor+0x4c7/0xc30 fs/splice.c:896 do_splice_direct+0x2a5/0x3e0 fs/splice.c:1002 do_sendfile+0x61c/0xff0 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1323 [inline] __se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1309 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f22f167cda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f22f24940c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f22f17abf80 RCX: 00007f22f167cda9 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004 RBP: 00007f22f16c947a R08: 0000000000000000 R09: 0000000000000000 R10: 0001000000201001 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f22f17abf80 R15: 00007ffc18693aa8