Remounting filesystem read-only 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:2785! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 5115 Comm: syz-executor176 Not tainted 6.5.0-rc3-next-20230728-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 RIP: 0010:submit_bh_wbc+0x4b3/0x5c0 fs/buffer.c:2785 Code: ff ff e8 20 23 8b ff be 08 00 00 00 48 89 df e8 53 f8 df ff f0 80 63 01 fb e9 f3 fc ff ff e8 04 23 8b ff 0f 0b e8 fd 22 8b ff <0f> 0b e8 f6 22 8b ff 0f 0b e8 ef 22 8b ff 0f 0b e8 e8 22 8b ff 0f RSP: 0018:ffffc90003b8f9a8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff888075317ae0 RCX: 0000000000000000 RDX: ffff888020908000 RSI: ffffffff81fbe0f3 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000400 FS: 00007f5311fd56c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5309bf5000 CR3: 000000002b6e1000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: submit_bh fs/buffer.c:2825 [inline] __bh_read+0xac/0x1f0 fs/buffer.c:3090 bh_read_nowait include/linux/buffer_head.h:438 [inline] __block_write_begin_int+0x11b7/0x1470 fs/buffer.c:2143 __block_write_begin fs/buffer.c:2163 [inline] block_write_begin+0xb1/0x490 fs/buffer.c:2222 nilfs_write_begin+0x9f/0x1a0 fs/nilfs2/inode.c:261 generic_perform_write+0x278/0x600 mm/filemap.c:3930 __generic_file_write_iter+0x1d0/0x240 mm/filemap.c:4021 generic_file_write_iter+0xe3/0x350 mm/filemap.c:4051 call_write_iter include/linux/fs.h:1948 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x650/0xe40 fs/read_write.c:584 ksys_write+0x12f/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f5312020989 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 91 1b 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:00007f5311fd5218 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f53120a16c8 RCX: 00007f5312020989 RDX: 00000000000000a0 RSI: 0000000020000380 RDI: 0000000000000006 RBP: 00007f53120a16c0 R08: 00000000ffffff7f R09: 0000000000000000 R10: 000000000000001b R11: 0000000000000246 R12: 00007f531206dddc R13: 00007f531206dbd8 R14: 3f00000000000000 R15: 0400000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:submit_bh_wbc+0x4b3/0x5c0 fs/buffer.c:2785 Code: ff ff e8 20 23 8b ff be 08 00 00 00 48 89 df e8 53 f8 df ff f0 80 63 01 fb e9 f3 fc ff ff e8 04 23 8b ff 0f 0b e8 fd 22 8b ff <0f> 0b e8 f6 22 8b ff 0f 0b e8 ef 22 8b ff 0f 0b e8 e8 22 8b ff 0f RSP: 0018:ffffc90003b8f9a8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff888075317ae0 RCX: 0000000000000000 RDX: ffff888020908000 RSI: ffffffff81fbe0f3 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000400 FS: 00007f5311fd56c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5309bf5000 CR3: 000000002b6e1000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400