BUG: Bad page state in process jfsCommit pfn:712cf page:ffffea0001c4b3c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1c pfn:0x712cf flags: 0xfff00000002005(locked|uptodate|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000002005 dead000000000100 dead000000000122 0000000000000000 raw: 000000000000001c ffff88807cf730f8 00000000ffffffff 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x140c40(GFP_NOFS|__GFP_COMP|__GFP_HARDWALL), pid 5399, tgid 5398 (syz-executor.0), ts 75498642023, free_ts 74752272943 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 folio_alloc+0x1e/0x60 mm/mempolicy.c:2289 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 do_read_cache_folio+0xed/0x820 mm/filemap.c:3644 do_read_cache_page+0x32/0x220 mm/filemap.c:3746 read_mapping_page include/linux/pagemap.h:772 [inline] __get_metapage+0x330/0x10e0 fs/jfs/jfs_metapage.c:620 diRead+0x5f4/0xae0 fs/jfs/jfs_imap.c:363 jfs_iget+0x8c/0x3b0 fs/jfs/inode.c:35 jfs_fill_super+0x808/0xc50 fs/jfs/super.c:580 mount_bdev+0x2d0/0x3f0 fs/super.c:1380 legacy_get_tree+0xef/0x190 fs/fs_context.c:610 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3039 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0x90 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x8fe/0xa10 mm/page_alloc.c:2564 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2659 discard_slab mm/slub.c:2097 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2636 put_cpu_partial+0x116/0x180 mm/slub.c:2712 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x23/0x60 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x64/0x380 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x111/0x2a0 mm/slub.c:3475 getname_flags+0xbc/0x4e0 fs/namei.c:140 vfs_fstatat fs/stat.c:275 [inline] __do_sys_newfstatat fs/stat.c:446 [inline] __se_sys_newfstatat fs/stat.c:440 [inline] __x64_sys_newfstatat+0x12e/0x1d0 fs/stat.c:440 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Modules linked in: CPU: 0 PID: 105 Comm: jfsCommit Not tainted 6.4.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 bad_page+0x14b/0x170 mm/page_alloc.c:610 free_page_is_bad mm/page_alloc.c:1130 [inline] free_pages_prepare mm/page_alloc.c:1294 [inline] free_unref_page_prepare+0x9a3/0xa10 mm/page_alloc.c:2564 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2659 txUnlock+0x282/0xca0 fs/jfs/jfs_txnmgr.c:927 txLazyCommit fs/jfs/jfs_txnmgr.c:2677 [inline] jfs_lazycommit+0x5d4/0xb70 fs/jfs/jfs_txnmgr.c:2727 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page:ffffea0001c4b3c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1c pfn:0x712cf flags: 0xfff00000002005(locked|uptodate|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000002005 dead000000000100 dead000000000122 0000000000000000 raw: 000000000000001c ffff88807cf730f8 00000000ffffffff 0000000000000000 page dumped because: VM_BUG_ON_FOLIO(((unsigned int) folio_ref_count(folio) + 127u <= 127u)) page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x140c40(GFP_NOFS|__GFP_COMP|__GFP_HARDWALL), pid 5399, tgid 5398 (syz-executor.0), ts 75498642023, free_ts 74752272943 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 folio_alloc+0x1e/0x60 mm/mempolicy.c:2289 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 do_read_cache_folio+0xed/0x820 mm/filemap.c:3644 do_read_cache_page+0x32/0x220 mm/filemap.c:3746 read_mapping_page include/linux/pagemap.h:772 [inline] __get_metapage+0x330/0x10e0 fs/jfs/jfs_metapage.c:620 diRead+0x5f4/0xae0 fs/jfs/jfs_imap.c:363 jfs_iget+0x8c/0x3b0 fs/jfs/inode.c:35 jfs_fill_super+0x808/0xc50 fs/jfs/super.c:580 mount_bdev+0x2d0/0x3f0 fs/super.c:1380 legacy_get_tree+0xef/0x190 fs/fs_context.c:610 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3039 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0x90 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x8fe/0xa10 mm/page_alloc.c:2564 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2659 discard_slab mm/slub.c:2097 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2636 put_cpu_partial+0x116/0x180 mm/slub.c:2712 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x23/0x60 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x64/0x380 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x111/0x2a0 mm/slub.c:3475 getname_flags+0xbc/0x4e0 fs/namei.c:140 vfs_fstatat fs/stat.c:275 [inline] __do_sys_newfstatat fs/stat.c:446 [inline] __se_sys_newfstatat fs/stat.c:440 [inline] __x64_sys_newfstatat+0x12e/0x1d0 fs/stat.c:440 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd ------------[ cut here ]------------ kernel BUG at include/linux/mm.h:1396! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 105 Comm: jfsCommit Tainted: G B 6.4.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 RIP: 0010:folio_get include/linux/mm.h:1396 [inline] RIP: 0010:get_page include/linux/mm.h:1402 [inline] RIP: 0010:put_metapage+0x2a0/0x350 fs/jfs/jfs_metapage.c:750 Code: 2c 24 49 81 e5 ff 0f 00 00 74 21 e8 0a f6 82 fe e9 a0 00 00 00 e8 00 f6 82 fe 48 8b 3c 24 48 c7 c6 60 06 21 8b e8 f0 a4 c2 fe <0f> 0b 48 8b 1c 24 48 89 df be 08 00 00 00 e8 fd a5 da fe 48 c1 eb RSP: 0018:ffffc90002d8fcb8 EFLAGS: 00010246 RAX: 594b22a55f2c5900 RBX: 000000000000007f RCX: ffffffff816a2d80 RDX: 0000000000000000 RSI: ffffffff8b38a0a0 RDI: ffffffff8b38a060 RBP: ffff88807cf730f8 R08: dffffc0000000000 R09: fffffbfff1caa9e6 R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: ffffea0001c4b3f4 R14: 1ffff1100f9ee624 R15: ffff88807cf73120 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2ad73583b0 CR3: 0000000029394000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: txUnlock+0x42f/0xca0 fs/jfs/jfs_txnmgr.c:942 txLazyCommit fs/jfs/jfs_txnmgr.c:2677 [inline] jfs_lazycommit+0x5d4/0xb70 fs/jfs/jfs_txnmgr.c:2727 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:folio_get include/linux/mm.h:1396 [inline] RIP: 0010:get_page include/linux/mm.h:1402 [inline] RIP: 0010:put_metapage+0x2a0/0x350 fs/jfs/jfs_metapage.c:750 Code: 2c 24 49 81 e5 ff 0f 00 00 74 21 e8 0a f6 82 fe e9 a0 00 00 00 e8 00 f6 82 fe 48 8b 3c 24 48 c7 c6 60 06 21 8b e8 f0 a4 c2 fe <0f> 0b 48 8b 1c 24 48 89 df be 08 00 00 00 e8 fd a5 da fe 48 c1 eb RSP: 0018:ffffc90002d8fcb8 EFLAGS: 00010246 RAX: 594b22a55f2c5900 RBX: 000000000000007f RCX: ffffffff816a2d80 RDX: 0000000000000000 RSI: ffffffff8b38a0a0 RDI: ffffffff8b38a060 RBP: ffff88807cf730f8 R08: dffffc0000000000 R09: fffffbfff1caa9e6 R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: ffffea0001c4b3f4 R14: 1ffff1100f9ee624 R15: ffff88807cf73120 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2ad73583b0 CR3: 0000000029725000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400