NILFS (loop2): nilfs_get_block (ino=18): a race condition while inserting a data block at offset=0 ------------[ cut here ]------------ kernel BUG at fs/buffer.c:2765! invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 1 PID: 27062 Comm: syz-executor.2 Not tainted 6.8.0-rc7-syzkaller-00017-g29cd507cbec2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 RIP: 0010:submit_bh_wbc+0x517/0x540 fs/buffer.c:2765 Code: 6d 7e ff be 00 10 00 00 48 c7 c7 40 91 26 8e 4c 89 ea e8 5c ea bb 02 e9 b1 fe ff ff e8 72 6d 7e ff 90 0f 0b e8 6a 6d 7e ff 90 <0f> 0b e8 62 6d 7e ff 90 0f 0b e8 5a 6d 7e ff 90 0f 0b e8 52 6d 7e RSP: 0018:ffffc90014daf698 EFLAGS: 00010287 RAX: ffffffff8214ffe6 RBX: 0000000000000000 RCX: 0000000000040000 RDX: ffffc9000bbfa000 RSI: 0000000000001bb7 RDI: 0000000000001bb8 RBP: 0000000000000000 R08: ffffffff8214fb74 R09: 1ffff11004bc16ae R10: dffffc0000000000 R11: ffffed1004bc16af R12: ffff888025e0b570 R13: 1ffff11004bc16ae R14: 0000000000000000 R15: 0000000000000400 FS: 00007f692a8476c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2b7c61a000 CR3: 000000007d064000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: submit_bh fs/buffer.c:2805 [inline] __bh_read fs/buffer.c:3070 [inline] bh_read_nowait include/linux/buffer_head.h:417 [inline] __block_write_begin_int+0x12ce/0x1a70 fs/buffer.c:2132 __block_write_begin fs/buffer.c:2152 [inline] block_write_begin+0x9b/0x1e0 fs/buffer.c:2211 nilfs_write_begin+0xa0/0x110 fs/nilfs2/inode.c:262 generic_perform_write+0x321/0x640 mm/filemap.c:3930 __generic_file_write_iter+0x1b8/0x230 mm/filemap.c:4022 generic_file_write_iter+0xaf/0x310 mm/filemap.c:4051 do_iter_readv_writev+0x46c/0x640 vfs_writev+0x395/0xbb0 fs/read_write.c:971 do_pwritev fs/read_write.c:1072 [inline] __do_sys_pwritev2 fs/read_write.c:1131 [inline] __se_sys_pwritev2+0x1ca/0x2d0 fs/read_write.c:1122 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f6929a7dda9 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:00007f692a8470c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f6929bac1f0 RCX: 00007f6929a7dda9 RDX: 0000000000000003 RSI: 0000000020000440 RDI: 0000000000000005 RBP: 00007f6929aca47a R08: 000000000000009b R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f6929bac1f0 R15: 00007ffff1f03418 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:submit_bh_wbc+0x517/0x540 fs/buffer.c:2765 Code: 6d 7e ff be 00 10 00 00 48 c7 c7 40 91 26 8e 4c 89 ea e8 5c ea bb 02 e9 b1 fe ff ff e8 72 6d 7e ff 90 0f 0b e8 6a 6d 7e ff 90 <0f> 0b e8 62 6d 7e ff 90 0f 0b e8 5a 6d 7e ff 90 0f 0b e8 52 6d 7e RSP: 0018:ffffc90014daf698 EFLAGS: 00010287 RAX: ffffffff8214ffe6 RBX: 0000000000000000 RCX: 0000000000040000 RDX: ffffc9000bbfa000 RSI: 0000000000001bb7 RDI: 0000000000001bb8 RBP: 0000000000000000 R08: ffffffff8214fb74 R09: 1ffff11004bc16ae R10: dffffc0000000000 R11: ffffed1004bc16af R12: ffff888025e0b570 R13: 1ffff11004bc16ae R14: 0000000000000000 R15: 0000000000000400 FS: 00007f692a8476c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f38b123f000 CR3: 000000007d064000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400