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:2768! invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 1 PID: 24764 Comm: syz-executor.0 Not tainted 6.8.0-syzkaller-00974-g86833aec4479 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 RIP: 0010:submit_bh_wbc+0x543/0x560 fs/buffer.c:2768 Code: 39 7e ff be 00 10 00 00 48 c7 c7 40 ca 26 8e 4c 89 fa e8 70 cb bc 02 e9 98 fe ff ff e8 f6 38 7e ff 90 0f 0b e8 ee 38 7e ff 90 <0f> 0b e8 e6 38 7e ff 90 0f 0b e8 de 38 7e ff 90 0f 0b e8 d6 38 7e RSP: 0018:ffffc90004357338 EFLAGS: 00010283 RAX: ffffffff8216b1d2 RBX: 0000000000000000 RCX: 0000000000040000 RDX: ffffc90004651000 RSI: 000000000000405d RDI: 000000000000405e RBP: 0000000000000000 R08: ffffffff8216ad33 R09: 1ffff11008aba796 R10: dffffc0000000000 R11: ffffed1008aba797 R12: 0000000000000000 R13: ffff8880455d3cb0 R14: 0000000000000000 R15: 1ffff11008aba796 FS: 00007fceb34d06c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b3132a000 CR3: 00000000305fa000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: submit_bh fs/buffer.c:2809 [inline] __bh_read fs/buffer.c:3074 [inline] bh_read_nowait include/linux/buffer_head.h:417 [inline] __block_write_begin_int+0x12d0/0x1a70 fs/buffer.c:2134 __block_write_begin fs/buffer.c:2154 [inline] block_write_begin+0x9b/0x1e0 fs/buffer.c:2213 nilfs_write_begin+0xa0/0x110 fs/nilfs2/inode.c:262 generic_perform_write+0x321/0x640 mm/filemap.c:3921 __generic_file_write_iter+0x1b8/0x230 mm/filemap.c:4013 generic_file_write_iter+0xaf/0x310 mm/filemap.c:4042 call_write_iter include/linux/fs.h:2108 [inline] iter_file_splice_write+0xbd6/0x14e0 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x11e/0x220 fs/splice.c:1164 splice_direct_to_actor+0x58d/0xc80 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x28c/0x3e0 fs/splice.c:1233 do_sendfile+0x56d/0xdc0 fs/read_write.c:1295 __do_sys_sendfile64 fs/read_write.c:1362 [inline] __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1348 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7fceb267dda9 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:00007fceb34d00c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007fceb27abf80 RCX: 00007fceb267dda9 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000004 RBP: 00007fceb26ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 000000002a76cddc R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fceb27abf80 R15: 00007ffebdad95f8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:submit_bh_wbc+0x543/0x560 fs/buffer.c:2768 Code: 39 7e ff be 00 10 00 00 48 c7 c7 40 ca 26 8e 4c 89 fa e8 70 cb bc 02 e9 98 fe ff ff e8 f6 38 7e ff 90 0f 0b e8 ee 38 7e ff 90 <0f> 0b e8 e6 38 7e ff 90 0f 0b e8 de 38 7e ff 90 0f 0b e8 d6 38 7e RSP: 0018:ffffc90004357338 EFLAGS: 00010283 RAX: ffffffff8216b1d2 RBX: 0000000000000000 RCX: 0000000000040000 RDX: ffffc90004651000 RSI: 000000000000405d RDI: 000000000000405e RBP: 0000000000000000 R08: ffffffff8216ad33 R09: 1ffff11008aba796 R10: dffffc0000000000 R11: ffffed1008aba797 R12: 0000000000000000 R13: ffff8880455d3cb0 R14: 0000000000000000 R15: 1ffff11008aba796 FS: 00007fceb34d06c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555556275978 CR3: 00000000305fa000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400