------------[ cut here ]------------ WARNING: CPU: 1 PID: 16580 at fs/nilfs2/dat.c:158 nilfs_dat_prepare_end+0x219/0x320 fs/nilfs2/dat.c:158 Modules linked in: CPU: 0 PID: 16580 Comm: syz-executor.2 Not tainted 6.2.0-rc4-next-20230120-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 RIP: 0010:nilfs_dat_prepare_end+0x219/0x320 fs/nilfs2/dat.c:158 Code: 48 83 c4 10 5b 5d 41 5c 41 5d 41 5e c3 e8 ef 02 59 fe 44 89 e6 bf fe ff ff ff e8 92 ff 58 fe 41 83 fc fe 75 d3 e8 d7 02 59 fe <0f> 0b eb ca e8 ce 02 59 fe 48 89 de 4c 89 ef e8 a3 b4 03 00 31 ff RSP: 0018:ffffc90016017430 EFLAGS: 00010212 RAX: 000000000000435c RBX: ffff888080e32618 RCX: ffffc900065ca000 RDX: 0000000000040000 RSI: ffffffff8328f709 RDI: 0000000000000005 RBP: ffff888080e32630 R08: 0000000000000005 R09: 00000000fffffffe R10: 00000000fffffffe R11: 0000000000000000 R12: 00000000fffffffe R13: ffff88809e22a7c8 R14: ffff888080e32608 R15: ffff88809e22a7c8 FS: 00007f1980ed8700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f854f385058 CR3: 0000000080c49000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: nilfs_bmap_prepare_end_ptr fs/nilfs2/bmap.h:211 [inline] nilfs_btree_prepare_delete fs/nilfs2/btree.c:1451 [inline] nilfs_btree_delete+0x2c0/0x1100 fs/nilfs2/btree.c:1599 nilfs_bmap_do_delete+0x225/0x2e0 fs/nilfs2/bmap.c:176 nilfs_bmap_do_truncate fs/nilfs2/bmap.c:264 [inline] nilfs_bmap_truncate+0x10d/0x300 fs/nilfs2/bmap.c:297 nilfs_truncate_bmap+0x14a/0x360 fs/nilfs2/inode.c:846 nilfs_truncate+0x264/0x510 fs/nilfs2/inode.c:876 nilfs_setattr+0x257/0x2b0 fs/nilfs2/inode.c:972 notify_change+0xb2c/0x1180 fs/attr.c:482 do_truncate+0x143/0x200 fs/open.c:66 handle_truncate fs/namei.c:3219 [inline] do_open fs/namei.c:3564 [inline] path_openat+0x2083/0x2750 fs/namei.c:3715 do_filp_open+0x1ba/0x410 fs/namei.c:3742 do_sys_openat2+0x16d/0x4c0 fs/open.c:1312 do_sys_open fs/open.c:1328 [inline] __do_sys_open fs/open.c:1336 [inline] __se_sys_open fs/open.c:1332 [inline] __x64_sys_open+0x11d/0x1c0 fs/open.c:1332 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f198008c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007f1980ed8168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f19801abf80 RCX: 00007f198008c0c9 RDX: 0000000000000000 RSI: 000000000014d27e RDI: 00000000200010c0 RBP: 00007f19800e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff456c56ff R14: 00007f1980ed8300 R15: 0000000000022000