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:2786! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 2 PID: 21496 Comm: syz-executor.0 Not tainted 6.7.0-rc8-syzkaller-00130-g6d0dc8559c84 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:submit_bh_wbc+0x5aa/0x6f0 fs/buffer.c:2786 Code: e8 8b ed 89 ff be 08 00 00 00 48 89 df e8 8e da df ff f0 80 63 01 fb e9 fe fb ff ff e8 6f ed 89 ff 90 0f 0b e8 67 ed 89 ff 90 <0f> 0b e8 5f ed 89 ff 90 0f 0b e8 57 ed 89 ff 90 0f 0b e8 4f ed 89 RSP: 0018:ffffc90006c8f9a0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88802e6e7a38 RCX: ffffffff81fc7290 RDX: ffff88805ebecd80 RSI: ffffffff81fc7799 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000005 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007ff863d9f6c0(0000) GS:ffff88806b800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff863d5dd58 CR3: 0000000029901000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: submit_bh fs/buffer.c:2826 [inline] __bh_read+0xac/0x1f0 fs/buffer.c:3091 bh_read_nowait include/linux/buffer_head.h:420 [inline] __block_write_begin_int+0x124a/0x1560 fs/buffer.c:2148 __block_write_begin fs/buffer.c:2168 [inline] block_write_begin+0xb1/0x490 fs/buffer.c:2227 nilfs_write_begin+0x9f/0x1a0 fs/nilfs2/inode.c:261 generic_perform_write+0x278/0x600 mm/filemap.c:3927 __generic_file_write_iter+0x1d0/0x240 mm/filemap.c:4018 generic_file_write_iter+0xe3/0x350 mm/filemap.c:4048 call_write_iter include/linux/fs.h:2020 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x64f/0xdf0 fs/read_write.c:584 ksys_write+0x12f/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7ff86307cd29 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:00007ff863d9f0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff8631abf80 RCX: 00007ff86307cd29 RDX: 0000000000000118 RSI: 00000000200002c0 RDI: 0000000000000005 RBP: 00007ff8630c947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007ff8631abf80 R15: 00007ffd26982ed8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:submit_bh_wbc+0x5aa/0x6f0 fs/buffer.c:2786 Code: e8 8b ed 89 ff be 08 00 00 00 48 89 df e8 8e da df ff f0 80 63 01 fb e9 fe fb ff ff e8 6f ed 89 ff 90 0f 0b e8 67 ed 89 ff 90 <0f> 0b e8 5f ed 89 ff 90 0f 0b e8 57 ed 89 ff 90 0f 0b e8 4f ed 89 RSP: 0018:ffffc90006c8f9a0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88802e6e7a38 RCX: ffffffff81fc7290 RDX: ffff88805ebecd80 RSI: ffffffff81fc7799 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000005 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007ff863d9f6c0(0000) GS:ffff88806b800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff863d5dd58 CR3: 0000000029901000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400