BUG at fs/jfs/jfs_dmap.c:2977 assert(n < 4) ------------[ cut here ]------------ kernel BUG at fs/jfs/jfs_dmap.c:2977! invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 1 PID: 5056 Comm: syz-executor403 Not tainted 6.8.0-rc6-syzkaller-00278-g58c806d867bf #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 RIP: 0010:dbFindLeaf+0x1e2/0x2d0 fs/jfs/jfs_dmap.c:2977 Code: c3 cc cc cc cc e8 9e 08 8c fe 48 c7 c1 c0 17 4a 8b ba a1 0b 00 00 48 c7 c6 c0 15 4a 8b 48 c7 c7 40 16 4a 8b e8 5f f2 6d fe 90 <0f> 0b e8 77 08 8c fe 46 8d 34 b5 01 00 00 00 31 ff 83 6c 24 0c 01 RSP: 0018:ffffc900033a7328 EFLAGS: 00010282 RAX: 000000000000002b RBX: 0000000000000004 RCX: ffffffff816d5009 RDX: 0000000000000000 RSI: ffffffff816dd886 RDI: 0000000000000005 RBP: ffff8880153b7010 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000155 R14: 0000000000000014 R15: 00000000ffffffff FS: 0000555556f01380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020ea0000 CR3: 0000000022514000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dbAllocDmapLev+0xac/0x2f0 fs/jfs/jfs_dmap.c:1967 dbAllocCtl+0x12c/0x7b0 fs/jfs/jfs_dmap.c:1823 dbAllocAG+0x8c9/0xd30 fs/jfs/jfs_dmap.c:1364 dbAlloc+0x415/0xab0 fs/jfs/jfs_dmap.c:888 extBalloc fs/jfs/jfs_extent.c:326 [inline] extAlloc+0x50a/0xf00 fs/jfs/jfs_extent.c:122 jfs_get_block+0x42c/0xb20 fs/jfs/inode.c:248 __block_write_begin_int+0x4fb/0x16e0 fs/buffer.c:2103 __block_write_begin fs/buffer.c:2152 [inline] block_write_begin+0xb1/0x4a0 fs/buffer.c:2211 jfs_write_begin+0x31/0xe0 fs/jfs/inode.c:299 generic_perform_write+0x273/0x620 mm/filemap.c:3930 __generic_file_write_iter+0x1fd/0x240 mm/filemap.c:4025 generic_file_write_iter+0xe7/0x350 mm/filemap.c:4051 call_write_iter include/linux/fs.h:2087 [inline] do_iter_readv_writev+0x41d/0x670 fs/read_write.c:741 vfs_writev+0x36f/0xdb0 fs/read_write.c:971 do_pwritev+0x1b3/0x260 fs/read_write.c:1072 __do_sys_pwritev2 fs/read_write.c:1131 [inline] __se_sys_pwritev2 fs/read_write.c:1122 [inline] __x64_sys_pwritev2+0xef/0x160 fs/read_write.c:1122 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f025e033139 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 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:00007ffc1c157378 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007ffc1c157558 RCX: 00007f025e033139 RDX: 0000000000000001 RSI: 0000000020000100 RDI: 0000000000000004 RBP: 00007f025e0ac610 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000005405 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc1c157548 R14: 0000000000000001 R15: 0000000000000001 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:dbFindLeaf+0x1e2/0x2d0 fs/jfs/jfs_dmap.c:2977 Code: c3 cc cc cc cc e8 9e 08 8c fe 48 c7 c1 c0 17 4a 8b ba a1 0b 00 00 48 c7 c6 c0 15 4a 8b 48 c7 c7 40 16 4a 8b e8 5f f2 6d fe 90 <0f> 0b e8 77 08 8c fe 46 8d 34 b5 01 00 00 00 31 ff 83 6c 24 0c 01 RSP: 0018:ffffc900033a7328 EFLAGS: 00010282 RAX: 000000000000002b RBX: 0000000000000004 RCX: ffffffff816d5009 RDX: 0000000000000000 RSI: ffffffff816dd886 RDI: 0000000000000005 RBP: ffff8880153b7010 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000155 R14: 0000000000000014 R15: 00000000ffffffff FS: 0000555556f01380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005599b28e5c30 CR3: 0000000022514000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400