NILFS (loop0): nilfs_get_block (ino=19): a race condition while inserting a data block at offset=0
------------[ cut here ]------------
kernel BUG at fs/buffer.c:2666!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3686 Comm: syz-executor196 Not tainted 6.1.33-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:submit_bh_wbc+0x4c0/0x4e0 fs/buffer.c:2666
Code: 02 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c be fe ff ff 48 89 ef e8 e1 ab e0 ff e9 b1 fe ff ff e8 67 64 8a ff 0f 0b e8 60 64 8a ff <0f> 0b e8 59 64 8a ff 0f 0b e8 52 64 8a ff 0f 0b e8 4b 64 8a ff 0f
RSP: 0018:ffffc90003c3f860 EFLAGS: 00010293
RAX: ffffffff81ff70f0 RBX: 0000000000000000 RCX: ffff88807e458000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003c3fa48 R08: ffffffff81ff6ccd R09: ffffed100e1d92af
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1100e1d92ae
R13: ffff888070ec9570 R14: 0000000000000000 R15: 0000000000000000
FS: 00007f3c9cf96700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3c9cf96718 CR3: 00000000236ff000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
submit_bh fs/buffer.c:2707 [inline]
__bh_read fs/buffer.c:2972 [inline]
bh_read_nowait include/linux/buffer_head.h:427 [inline]
__block_write_begin_int+0x12b2/0x1a30 fs/buffer.c:2021
__block_write_begin fs/buffer.c:2041 [inline]
block_write_begin+0x98/0x1f0 fs/buffer.c:2102
nilfs_write_begin+0x9c/0x110 fs/nilfs2/inode.c:261
generic_perform_write+0x2fc/0x5e0 mm/filemap.c:3754
__generic_file_write_iter+0x297/0x400 mm/filemap.c:3850
generic_file_write_iter+0xab/0x310 mm/filemap.c:3914
call_write_iter include/linux/fs.h:2205 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x7ae/0xba0 fs/read_write.c:584
ksys_write+0x19c/0x2c0 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f3ca530b6e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3c9cf962f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f3ca53917b0 RCX: 00007f3ca530b6e9
RDX: 00000000000000a0 RSI: 0000000020000380 RDI: 0000000000000006
RBP: 00007f3ca535dd1c R08: 00000000ffffff7f R09: 0000000000000000
R10: 000000000000001b R11: 0000000000000246 R12: 00007f3ca535db18
R13: 3f00000000000000 R14: 0400000000000000 R15: 00007f3ca53917b8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:submit_bh_wbc+0x4c0/0x4e0 fs/buffer.c:2666
Code: 02 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c be fe ff ff 48 89 ef e8 e1 ab e0 ff e9 b1 fe ff ff e8 67 64 8a ff 0f 0b e8 60 64 8a ff <0f> 0b e8 59 64 8a ff 0f 0b e8 52 64 8a ff 0f 0b e8 4b 64 8a ff 0f
RSP: 0018:ffffc90003c3f860 EFLAGS: 00010293
RAX: ffffffff81ff70f0 RBX: 0000000000000000 RCX: ffff88807e458000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003c3fa48 R08: ffffffff81ff6ccd R09: ffffed100e1d92af
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1100e1d92ae
R13: ffff888070ec9570 R14: 0000000000000000 R15: 0000000000000000
FS: 00007f3c9cf96700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3ca534cdc0 CR3: 00000000236ff000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400