BUG at fs/jfs/jfs_dmap.c:3043 assert(n < 4) ------------[ cut here ]------------ kernel BUG at fs/jfs/jfs_dmap.c:3043! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 5248 Comm: syz.2.235 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 RIP: 0010:dbFindLeaf+0x517/0x520 fs/jfs/jfs_dmap.c:3043 Code: fe e9 51 ff ff ff e8 d8 ee ad fe 48 c7 c7 80 e6 41 8a 48 c7 c6 00 e4 41 8a ba e3 0b 00 00 48 c7 c1 80 f1 41 8a e8 99 d9 d3 06 <0f> 0b 0f 1f 80 00 00 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec RSP: 0018:ffffc9000384fac0 EFLAGS: 00010246 RAX: 000000000000002b RBX: 0000000000000000 RCX: 8bbda17eeff57100 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: 0000000000000003 R08: dffffc0000000000 R09: ffffed10172067a8 R10: ffffed10172067a8 R11: 1ffff110172067a7 R12: 000000000000000a R13: 0000000000000008 R14: 0000000000000005 R15: 0000000000000155 FS: 00007f26ceea36c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32123ffc CR3: 000000005f4ef000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dbAllocDmapLev+0x61/0x3c0 fs/jfs/jfs_dmap.c:2029 dbAllocCtl+0x148/0x9a0 fs/jfs/jfs_dmap.c:1885 dbAllocAG+0xb9c/0xf10 fs/jfs/jfs_dmap.c:1534 dbDiscardAG+0x2ca/0x8e0 fs/jfs/jfs_dmap.c:1670 jfs_ioc_trim+0x41e/0x680 fs/jfs/jfs_discard.c:106 jfs_ioctl+0x2a5/0x3a0 fs/jfs/ioctl.c:132 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f26d0c7dbe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f26ceea3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f26d0ea5180 RCX: 00007f26d0c7dbe9 RDX: 0000200000000000 RSI: 00000000c0185879 RDI: 0000000000000007 RBP: 00007f26d0d00e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f26d0ea5218 R14: 00007f26d0ea5180 R15: 00007ffd8a5bb008 Modules linked in: ---[ end trace 8a80268d5a5209a7 ]--- RIP: 0010:dbFindLeaf+0x517/0x520 fs/jfs/jfs_dmap.c:3043 Code: fe e9 51 ff ff ff e8 d8 ee ad fe 48 c7 c7 80 e6 41 8a 48 c7 c6 00 e4 41 8a ba e3 0b 00 00 48 c7 c1 80 f1 41 8a e8 99 d9 d3 06 <0f> 0b 0f 1f 80 00 00 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec RSP: 0018:ffffc9000384fac0 EFLAGS: 00010246 RAX: 000000000000002b RBX: 0000000000000000 RCX: 8bbda17eeff57100 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: 0000000000000003 R08: dffffc0000000000 R09: ffffed10172067a8 R10: ffffed10172067a8 R11: 1ffff110172067a7 R12: 000000000000000a R13: 0000000000000008 R14: 0000000000000005 R15: 0000000000000155 FS: 00007f26ceea36c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fccc678a198 CR3: 000000005f4ef000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400