BUG at fs/jfs/jfs_dmap.c:3051 assert(n < 4) ------------[ cut here ]------------ kernel BUG at fs/jfs/jfs_dmap.c:3051! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 9341 Comm: syz.8.836 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 RIP: 0010:dbFindLeaf+0x517/0x520 fs/jfs/jfs_dmap.c:3051 Code: fe e9 51 ff ff ff e8 28 9a ad fe 48 c7 c7 c0 1e 42 8a 48 c7 c6 40 1c 42 8a ba eb 0b 00 00 48 c7 c1 c0 29 42 8a e8 f9 3c cd 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:ffffc900038b7278 EFLAGS: 00010246 RAX: 000000000000002b RBX: 00000000ffffffff RCX: 9bedf4e3c24f6900 RDX: ffffc9000f62e000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: 0000000000000001 R08: dffffc0000000000 R09: ffffed10172067b0 R10: ffffed10172067b0 R11: 1ffff110172067af R12: 0000000000000008 R13: 0000000000000060 R14: 000000000000005d R15: 0000000000000155 FS: 00007fedb2a0d6c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1d3fe20000 CR3: 0000000079750000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dbAllocDmapLev+0x61/0x3c0 fs/jfs/jfs_dmap.c:2037 dbAlloc+0x988/0xb90 fs/jfs/jfs_dmap.c:844 extBalloc fs/jfs/jfs_extent.c:523 [inline] extAlloc+0x4d2/0xf30 fs/jfs/jfs_extent.c:125 jfs_get_block+0x343/0xab0 fs/jfs/inode.c:264 get_more_blocks fs/direct-io.c:673 [inline] do_direct_IO fs/direct-io.c:959 [inline] do_blockdev_direct_IO fs/direct-io.c:1276 [inline] __blockdev_direct_IO+0x146d/0x3c90 fs/direct-io.c:1368 blockdev_direct_IO include/linux/fs.h:3345 [inline] jfs_direct_IO+0x119/0x220 fs/jfs/inode.c:349 generic_file_direct_write+0x22c/0x490 mm/filemap.c:3687 __generic_file_write_iter+0x2b1/0x4e0 mm/filemap.c:3869 generic_file_write_iter+0xa6/0x1b0 mm/filemap.c:3944 do_iter_readv_writev+0x497/0x600 fs/read_write.c:-1 do_iter_write+0x205/0x7b0 fs/read_write.c:855 vfs_writev fs/read_write.c:928 [inline] do_pwritev+0x204/0x340 fs/read_write.c:1025 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:0x7fedb47a6749 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:00007fedb2a0d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007fedb49fcfa0 RCX: 00007fedb47a6749 RDX: 0000000000000001 RSI: 0000200000000240 RDI: 0000000000000005 RBP: 00007fedb482af91 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000002000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fedb49fd038 R14: 00007fedb49fcfa0 R15: 00007fff9a42bf38 Modules linked in: ---[ end trace 44330851389b0bff ]--- RIP: 0010:dbFindLeaf+0x517/0x520 fs/jfs/jfs_dmap.c:3051 Code: fe e9 51 ff ff ff e8 28 9a ad fe 48 c7 c7 c0 1e 42 8a 48 c7 c6 40 1c 42 8a ba eb 0b 00 00 48 c7 c1 c0 29 42 8a e8 f9 3c cd 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:ffffc900038b7278 EFLAGS: 00010246 RAX: 000000000000002b RBX: 00000000ffffffff RCX: 9bedf4e3c24f6900 RDX: ffffc9000f62e000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: 0000000000000001 R08: dffffc0000000000 R09: ffffed10172067b0 R10: ffffed10172067b0 R11: 1ffff110172067af R12: 0000000000000008 R13: 0000000000000060 R14: 000000000000005d R15: 0000000000000155 FS: 00007fedb2a0d6c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f87d7128000 CR3: 0000000079750000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400