BUG: Bad page state in process jfsCommit pfn:25171 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x1c pfn:0x25171 flags: 0xfff1000000420d(locked|referenced|uptodate|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff1000000420d dead000000000100 dead000000000122 0000000000000000 raw: 000000000000001c ffff88802b5880f8 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 5189, tgid 5188 (syz-executor.3), ts 66935171910, free_ts 65953370364 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2ce2/0x2d90 mm/page_alloc.c:3438 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4696 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_pages_noprof mm/mempolicy.c:2336 [inline] folio_alloc_noprof+0x128/0x180 mm/mempolicy.c:2343 filemap_alloc_folio_noprof+0xdf/0x500 mm/filemap.c:1008 do_read_cache_folio+0xed/0x820 mm/filemap.c:3753 do_read_cache_page+0x30/0x200 mm/filemap.c:3855 read_mapping_page include/linux/pagemap.h:888 [inline] __get_metapage+0x330/0x1050 fs/jfs/jfs_metapage.c:620 diRead+0x5f4/0xae0 fs/jfs/jfs_imap.c:364 jfs_iget+0x8c/0x3b0 fs/jfs/inode.c:35 jfs_fill_super+0x808/0xc50 fs/jfs/super.c:580 mount_bdev+0x20a/0x2d0 fs/super.c:1659 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1780 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 page last free pid 5193 tgid 5184 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_folios+0xf23/0x19e0 mm/page_alloc.c:2650 folios_put_refs+0x93a/0xa60 mm/swap.c:1024 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:332 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x44f/0xc80 mm/mmap.c:3354 __mmput+0x115/0x3c0 kernel/fork.c:1346 exit_mm+0x220/0x310 kernel/exit.c:565 do_exit+0x9aa/0x27e0 kernel/exit.c:861 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 get_signal+0x16a1/0x1740 kernel/signal.c:2909 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x102/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 PID: 113 Comm: jfsCommit Not tainted 6.9.0-rc7-next-20240509-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 bad_page+0x14c/0x170 mm/page_alloc.c:498 free_page_is_bad mm/page_alloc.c:909 [inline] free_pages_prepare mm/page_alloc.c:1080 [inline] free_unref_page+0xe47/0xea0 mm/page_alloc.c:2601 __folio_put+0x3b9/0x620 mm/swap.c:129 txUnlock+0x282/0xca0 fs/jfs/jfs_txnmgr.c:932 txLazyCommit fs/jfs/jfs_txnmgr.c:2682 [inline] jfs_lazycommit+0x5f4/0xb80 fs/jfs/jfs_txnmgr.c:2733 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x1c pfn:0x25171 flags: 0xfff1000000420d(locked|referenced|uptodate|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff1000000420d dead000000000100 dead000000000122 0000000000000000 raw: 000000000000001c ffff88802b5880f8 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 5189, tgid 5188 (syz-executor.3), ts 66935171910, free_ts 65953370364 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2ce2/0x2d90 mm/page_alloc.c:3438 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4696 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_pages_noprof mm/mempolicy.c:2336 [inline] folio_alloc_noprof+0x128/0x180 mm/mempolicy.c:2343 filemap_alloc_folio_noprof+0xdf/0x500 mm/filemap.c:1008 do_read_cache_folio+0xed/0x820 mm/filemap.c:3753 do_read_cache_page+0x30/0x200 mm/filemap.c:3855 read_mapping_page include/linux/pagemap.h:888 [inline] __get_metapage+0x330/0x1050 fs/jfs/jfs_metapage.c:620 diRead+0x5f4/0xae0 fs/jfs/jfs_imap.c:364 jfs_iget+0x8c/0x3b0 fs/jfs/inode.c:35 jfs_fill_super+0x808/0xc50 fs/jfs/super.c:580 mount_bdev+0x20a/0x2d0 fs/super.c:1659 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1780 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 page last free pid 5193 tgid 5184 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_folios+0xf23/0x19e0 mm/page_alloc.c:2650 folios_put_refs+0x93a/0xa60 mm/swap.c:1024 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:332 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x44f/0xc80 mm/mmap.c:3354 __mmput+0x115/0x3c0 kernel/fork.c:1346 exit_mm+0x220/0x310 kernel/exit.c:565 do_exit+0x9aa/0x27e0 kernel/exit.c:861 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 get_signal+0x16a1/0x1740 kernel/signal.c:2909 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x102/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f ------------[ cut here ]------------ kernel BUG at include/linux/mm.h:1474! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 PID: 113 Comm: jfsCommit Tainted: G B 6.9.0-rc7-next-20240509-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 RIP: 0010:folio_get include/linux/mm.h:1474 [inline] RIP: 0010:get_page include/linux/mm.h:1480 [inline] RIP: 0010:put_metapage+0x265/0x310 fs/jfs/jfs_metapage.c:750 Code: 24 49 81 e5 ff 0f 00 00 74 22 e8 e6 4f 6d fe e9 9c 00 00 00 e8 dc 4f 6d fe 48 8b 3c 24 48 c7 c6 20 a2 02 8c e8 bc 08 b7 fe 90 <0f> 0b 48 8b 1c 24 48 89 df be 08 00 00 00 e8 c8 0e d3 fe 48 c1 eb RSP: 0018:ffffc900024ffc98 EFLAGS: 00010246 RAX: 0bff13d462710000 RBX: 000000000000007f RCX: 0000000000000001 RDX: dffffc0000000000 RSI: ffffffff8c1fdae0 RDI: 0000000000000001 RBP: ffff88802b5880f8 R08: ffffffff8fad32ef R09: 1ffffffff1f5a65d R10: dffffc0000000000 R11: fffffbfff1f5a65e R12: dffffc0000000000 R13: ffffea0000945c74 R14: 1ffff110056b1024 R15: ffff88802b588120 FS: 0000000000000000(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055555de38938 CR3: 000000007862e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: txUnlock+0x42f/0xca0 fs/jfs/jfs_txnmgr.c:947 txLazyCommit fs/jfs/jfs_txnmgr.c:2682 [inline] jfs_lazycommit+0x5f4/0xb80 fs/jfs/jfs_txnmgr.c:2733 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:folio_get include/linux/mm.h:1474 [inline] RIP: 0010:get_page include/linux/mm.h:1480 [inline] RIP: 0010:put_metapage+0x265/0x310 fs/jfs/jfs_metapage.c:750 Code: 24 49 81 e5 ff 0f 00 00 74 22 e8 e6 4f 6d fe e9 9c 00 00 00 e8 dc 4f 6d fe 48 8b 3c 24 48 c7 c6 20 a2 02 8c e8 bc 08 b7 fe 90 <0f> 0b 48 8b 1c 24 48 89 df be 08 00 00 00 e8 c8 0e d3 fe 48 c1 eb RSP: 0018:ffffc900024ffc98 EFLAGS: 00010246 RAX: 0bff13d462710000 RBX: 000000000000007f RCX: 0000000000000001 RDX: dffffc0000000000 RSI: ffffffff8c1fdae0 RDI: 0000000000000001 RBP: ffff88802b5880f8 R08: ffffffff8fad32ef R09: 1ffffffff1f5a65d R10: dffffc0000000000 R11: fffffbfff1f5a65e R12: dffffc0000000000 R13: ffffea0000945c74 R14: 1ffff110056b1024 R15: ffff88802b588120 FS: 0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055555de40978 CR3: 00000000459de000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400