loop0: detected capacity change from 0 to 32768 BUG at fs/jfs/jfs_dmap.c:2999 assert(bitno < 32) ------------[ cut here ]------------ kernel BUG at fs/jfs/jfs_dmap.c:2999! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 5233 Comm: syz-executor383 Not tainted 6.1.0-rc3-next-20221103-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 RIP: 0010:dbFindBits.cold+0xa1/0xa3 fs/jfs/jfs_dmap.c:2999 Code: fa e9 77 d9 79 f9 e8 26 80 1a f8 48 c7 c1 40 c8 29 8a ba b7 0b 00 00 48 c7 c6 c0 c6 29 8a 48 c7 c7 00 c7 29 8a e8 df 6c f8 ff <0f> 0b e8 00 80 1a f8 49 63 d4 48 89 ee 48 c7 c7 20 8e 4c 8c e8 fe RSP: 0018:ffffc90003acf5c8 EFLAGS: 00010282 RAX: 0000000000000030 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88802b7057c0 RSI: ffffffff81625318 RDI: fffff52000759eab RBP: 0000000000009afb R08: 0000000000000030 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000010 R13: 0000000000000020 R14: 000000000fff9afb R15: 0000000000000010 FS: 0000555555ef1300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f85d4c1460 CR3: 0000000025fe1000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dbAllocNear fs/jfs/jfs_dmap.c:1239 [inline] dbAlloc+0x8e5/0xa70 fs/jfs/jfs_dmap.c:828 extBalloc fs/jfs/jfs_extent.c:321 [inline] extAlloc+0x4e7/0xeb0 fs/jfs/jfs_extent.c:122 jfs_get_block+0x661/0xa90 fs/jfs/inode.c:248 get_more_blocks fs/direct-io.c:665 [inline] do_direct_IO fs/direct-io.c:953 [inline] __blockdev_direct_IO+0x175a/0x4660 fs/direct-io.c:1266 blockdev_direct_IO include/linux/fs.h:3186 [inline] jfs_direct_IO+0x10a/0x2c0 fs/jfs/inode.c:336 generic_file_direct_write+0x1e8/0x540 mm/filemap.c:3695 __generic_file_write_iter+0x1a2/0x4d0 mm/filemap.c:3855 generic_file_write_iter+0xdf/0x350 mm/filemap.c:3931 call_write_iter include/linux/fs.h:2159 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9e9/0xdd0 fs/read_write.c:584 ksys_write+0x127/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fc101ac4f29 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffb45ad028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc101ac4f29 RDX: 00000000ffffffa7 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00007fc101a846f0 R08: 0000000000000000 R09: 00007fc101a846f0 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000f8008000 R13: 0000000000000000 R14: 00080000000000f8 R15: 0000000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:dbFindBits.cold+0xa1/0xa3 fs/jfs/jfs_dmap.c:2999 Code: fa e9 77 d9 79 f9 e8 26 80 1a f8 48 c7 c1 40 c8 29 8a ba b7 0b 00 00 48 c7 c6 c0 c6 29 8a 48 c7 c7 00 c7 29 8a e8 df 6c f8 ff <0f> 0b e8 00 80 1a f8 49 63 d4 48 89 ee 48 c7 c7 20 8e 4c 8c e8 fe RSP: 0018:ffffc90003acf5c8 EFLAGS: 00010282 RAX: 0000000000000030 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88802b7057c0 RSI: ffffffff81625318 RDI: fffff52000759eab RBP: 0000000000009afb R08: 0000000000000030 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000010 R13: 0000000000000020 R14: 000000000fff9afb R15: 0000000000000010 FS: 0000555555ef1300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f85d4c1460 CR3: 0000000025fe1000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400