loop0: detected capacity change from 0 to 32768 BUG at fs/jfs/jfs_dmap.c:2984 assert(bitno < 32) ------------[ cut here ]------------ kernel BUG at fs/jfs/jfs_dmap.c:2984! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 3607 Comm: syz-executor103 Not tainted 6.0.0-rc7-syzkaller-00250-ga962b54e162c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 RIP: 0010:dbFindBits+0x1d7/0x1e0 fs/jfs/jfs_dmap.c:2984 Code: 23 07 0f 0b e8 fa 15 8a fe 48 c7 c7 a0 4b cd 8a 48 c7 c6 60 59 cd 8a ba a8 0b 00 00 48 c7 c1 60 53 cd 8a 31 c0 e8 da 3d 23 07 <0f> 0b 0f 1f 80 00 00 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec RSP: 0018:ffffc9000386f148 EFLAGS: 00010246 RAX: 0000000000000030 RBX: 0000000000000000 RCX: aa84193d93d51800 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: 0000000000000020 R08: ffffffff816bd38d R09: ffffed10173467f1 R10: ffffed10173467f1 R11: 1ffff110173467f0 R12: 0000000000000010 R13: 0000000000000000 R14: 000000000fff9afb R15: 0000000000000004 FS: 0000555555ad0300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffccb7459b4 CR3: 000000007ce27000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dbAllocNear+0x20c/0x390 fs/jfs/jfs_dmap.c:1224 dbAlloc+0xa12/0xc90 fs/jfs/jfs_dmap.c:813 extBalloc fs/jfs/jfs_extent.c:321 [inline] extAlloc+0x4b9/0xff0 fs/jfs/jfs_extent.c:122 jfs_get_block+0x342/0xce0 fs/jfs/inode.c:248 get_more_blocks fs/direct-io.c:667 [inline] do_direct_IO fs/direct-io.c:955 [inline] __blockdev_direct_IO+0x17f7/0x3cb0 fs/direct-io.c:1268 blockdev_direct_IO include/linux/fs.h:3200 [inline] jfs_direct_IO+0xf6/0x1e0 fs/jfs/inode.c:336 generic_file_direct_write+0x294/0x610 mm/filemap.c:3662 __generic_file_write_iter+0x1c4/0x400 mm/filemap.c:3822 generic_file_write_iter+0xab/0x310 mm/filemap.c:3898 call_write_iter include/linux/fs.h:2187 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7dc/0xc50 fs/read_write.c:584 ksys_write+0x177/0x2a0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff0a081bf29 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:00007ffd74e8bdc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff0a081bf29 RDX: 00000000ffffffa7 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00007ff0a07db6f0 R08: 0000000000000000 R09: 00007ff0a07db6f0 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000f8008000 R13: 0000000000000000 R14: 00080000000000f8 R15: 0000000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:dbFindBits+0x1d7/0x1e0 fs/jfs/jfs_dmap.c:2984 Code: 23 07 0f 0b e8 fa 15 8a fe 48 c7 c7 a0 4b cd 8a 48 c7 c6 60 59 cd 8a ba a8 0b 00 00 48 c7 c1 60 53 cd 8a 31 c0 e8 da 3d 23 07 <0f> 0b 0f 1f 80 00 00 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec RSP: 0018:ffffc9000386f148 EFLAGS: 00010246 RAX: 0000000000000030 RBX: 0000000000000000 RCX: aa84193d93d51800 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: 0000000000000020 R08: ffffffff816bd38d R09: ffffed10173467f1 R10: ffffed10173467f1 R11: 1ffff110173467f0 R12: 0000000000000010 R13: 0000000000000000 R14: 000000000fff9afb R15: 0000000000000004 FS: 0000555555ad0300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005561ec272b48 CR3: 000000007ce27000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400