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: 5084 Comm: syz.2.130 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:ffffc9000393fac0 EFLAGS: 00010246 RAX: 000000000000002b RBX: 0000000000000000 RCX: 72c7c281889c3e00 RDX: ffffc9000cb51000 RSI: 000000000000a699 RDI: 000000000000a69a RBP: 0000000000000003 R08: dffffc0000000000 R09: ffffed10172067a8 R10: ffffed10172067a8 R11: 1ffff110172067a7 R12: 000000000000000a R13: 0000000000000008 R14: 0000000000000005 R15: 0000000000000155 FS: 00007f757e3646c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f757e343d58 CR3: 000000007ee96000 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:0x7f75800fcbe9 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:00007f757e364038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f7580323fa0 RCX: 00007f75800fcbe9 RDX: 0000200000000080 RSI: 00000000c0185879 RDI: 0000000000000004 RBP: 00007f758017fe19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f7580324038 R14: 00007f7580323fa0 R15: 00007ffd97a7c9e8 Modules linked in: ---[ end trace 50a871e71e16e280 ]--- 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:ffffc9000393fac0 EFLAGS: 00010246 RAX: 000000000000002b RBX: 0000000000000000 RCX: 72c7c281889c3e00 RDX: ffffc9000cb51000 RSI: 000000000000a699 RDI: 000000000000a69a RBP: 0000000000000003 R08: dffffc0000000000 R09: ffffed10172067a8 R10: ffffed10172067a8 R11: 1ffff110172067a7 R12: 000000000000000a R13: 0000000000000008 R14: 0000000000000005 R15: 0000000000000155 FS: 00007f757e3646c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000002080 CR3: 000000007ee96000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400