BUG at fs/jfs/jfs_dmap.c:3018 assert(nb <= DBWORD) ------------[ cut here ]------------ kernel BUG at fs/jfs/jfs_dmap.c:3018! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 UID: 0 PID: 12728 Comm: syz.1.683 Not tainted 6.12.0-syzkaller-00171-g23acd177540d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 RIP: 0010:dbFindBits+0x1a7/0x1d0 fs/jfs/jfs_dmap.c:3018 Code: e9 fa fe ff ff e8 29 a2 6a fe 48 c7 c7 00 32 43 8c 48 c7 c6 40 2f 43 8c ba ca 0b 00 00 48 c7 c1 c0 39 43 8c e8 5a 6a 92 08 90 <0f> 0b e8 02 a2 6a fe 48 c7 c7 00 32 43 8c 48 c7 c6 40 2f 43 8c ba RSP: 0018:ffffc900050af940 EFLAGS: 00010246 RAX: 0000000000000032 RBX: ffff888067c37800 RCX: e839ae04837f7d00 RDX: ffffc9000ce6c000 RSI: 0000000000002b51 RDI: 0000000000002b52 RBP: ffffc900050afa48 R08: ffffffff8174b14c R09: 1ffff92000a15ec4 R10: dffffc0000000000 R11: fffff52000a15ec5 R12: 0000000000000400 R13: 1ffff92000a15f38 R14: 00000000ffffffff R15: 000000000000000a FS: 00007fcb9076a6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcb859ff800 CR3: 000000006da6e000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dbAllocDmapLev+0x1e9/0x4a0 fs/jfs/jfs_dmap.c:1985 dbAllocCtl+0x113/0x920 fs/jfs/jfs_dmap.c:1825 dbAllocAG+0x28f/0x10b0 fs/jfs/jfs_dmap.c:1364 dbDiscardAG+0x352/0xa20 fs/jfs/jfs_dmap.c:1613 jfs_ioc_trim+0x45a/0x6b0 fs/jfs/jfs_discard.c:105 jfs_ioctl+0x2cd/0x3e0 fs/jfs/ioctl.c:131 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcb8f97e759 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:00007fcb9076a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fcb8fb35f80 RCX: 00007fcb8f97e759 RDX: 0000000020000680 RSI: 00000000c0185879 RDI: 0000000000000006 RBP: 00007fcb8f9f175e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fcb8fb35f80 R15: 00007ffd2e245768 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:dbFindBits+0x1a7/0x1d0 fs/jfs/jfs_dmap.c:3018 Code: e9 fa fe ff ff e8 29 a2 6a fe 48 c7 c7 00 32 43 8c 48 c7 c6 40 2f 43 8c ba ca 0b 00 00 48 c7 c1 c0 39 43 8c e8 5a 6a 92 08 90 <0f> 0b e8 02 a2 6a fe 48 c7 c7 00 32 43 8c 48 c7 c6 40 2f 43 8c ba RSP: 0018:ffffc900050af940 EFLAGS: 00010246 RAX: 0000000000000032 RBX: ffff888067c37800 RCX: e839ae04837f7d00 RDX: ffffc9000ce6c000 RSI: 0000000000002b51 RDI: 0000000000002b52 RBP: ffffc900050afa48 R08: ffffffff8174b14c R09: 1ffff92000a15ec4 R10: dffffc0000000000 R11: fffff52000a15ec5 R12: 0000000000000400 R13: 1ffff92000a15f38 R14: 00000000ffffffff R15: 000000000000000a FS: 00007fcb9076a6c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fec36f96000 CR3: 000000006da6e000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400