NILFS (loop0): discard dirty block: blocknr=18446744073709551615, size=1024 NILFS (loop0): discard dirty block: blocknr=18446744073709551615, size=1024 NILFS (loop0): nilfs_get_block (ino=18): 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 PTI CPU: 1 PID: 2623 Comm: syz-executor.0 Not tainted 6.2.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:submit_bh_wbc+0x123/0x140 fs/buffer.c:2666 Code: 00 4c 89 ff e8 de 8d 47 00 48 8b 73 10 48 8b 53 20 4c 89 f7 e8 5e 9a fe ff 4c 89 ff 5b 41 5e 41 5f e9 d1 3c 45 00 90 0f 0b 90 <0f> 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 66 2e 0f 1f 84 00 00 00 RSP: 0018:ffffc90002203c20 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88810fc2f7e0 RCX: 0000000000000020 RDX: 0000000000000000 RSI: ffff88810fc2f7e0 RDI: 0000000000000000 RBP: ffffc90002203ce8 R08: 0000000000000000 R09: ffffffff832c1db0 R10: 00000000ffffffff R11: 00000000ffffdfff R12: 0000000000000020 R13: ffff88810fc2f7e0 R14: 0000000000000400 R15: 0000000000000000 FS: 00007f60d62c56c0(0000) GS:ffff88813bd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f60d55a8000 CR3: 0000000101a4e000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: 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+0x216/0x6f0 fs/buffer.c:2021 __block_write_begin fs/buffer.c:2041 [inline] block_write_begin+0x49/0xb0 fs/buffer.c:2102 nilfs_write_begin+0x4c/0x90 fs/nilfs2/inode.c:261 generic_perform_write+0xa2/0x230 mm/filemap.c:3772 __generic_file_write_iter+0xc7/0x140 mm/filemap.c:3868 generic_file_write_iter+0x46/0xc0 mm/filemap.c:3932 call_write_iter include/linux/fs.h:2189 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x32e/0x400 fs/read_write.c:584 ksys_write+0x70/0xe0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x46/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x73/0xdd RIP: 0033:0x7f60d547de69 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:00007f60d62c50c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f60d55abf80 RCX: 00007f60d547de69 RDX: 0000000000000020 RSI: 0000000020000140 RDI: 0000000000000005 RBP: 00007f60d54ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f60d55abf80 R15: 00007ffe97320f58 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:submit_bh_wbc+0x123/0x140 fs/buffer.c:2666 Code: 00 4c 89 ff e8 de 8d 47 00 48 8b 73 10 48 8b 53 20 4c 89 f7 e8 5e 9a fe ff 4c 89 ff 5b 41 5e 41 5f e9 d1 3c 45 00 90 0f 0b 90 <0f> 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 66 2e 0f 1f 84 00 00 00 RSP: 0018:ffffc90002203c20 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88810fc2f7e0 RCX: 0000000000000020 RDX: 0000000000000000 RSI: ffff88810fc2f7e0 RDI: 0000000000000000 RBP: ffffc90002203ce8 R08: 0000000000000000 R09: ffffffff832c1db0 R10: 00000000ffffffff R11: 00000000ffffdfff R12: 0000000000000020 R13: ffff88810fc2f7e0 R14: 0000000000000400 R15: 0000000000000000 FS: 00007f60d62c56c0(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f60cccff000 CR3: 0000000101a4e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400