BUG: Bad page state in process syz.2.5228 pfn:14bf33 page: refcount:0 mapcount:0 mapping:ffff88811dcb9108 index:0x0 pfn:0x14bf33 aops:v9fs_addr_operations ino:2 dentry name(?):"/" flags: 0x4000000000000001(locked|zone=1) raw: 4000000000000001 dead000000000100 dead000000000122 ffff88811dcb9108 raw: 0000000000000000 0000000000000000 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 Movable, gfp_mask 0x141cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_WRITE), pid 15893, tgid 15891 (syz.2.5228), ts 367426722662, free_ts 367346078167 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook+0x3b9/0x3f0 mm/page_alloc.c:1826 prep_new_page+0x1c/0x120 mm/page_alloc.c:1834 get_page_from_freelist+0x48ce/0x4960 mm/page_alloc.c:3914 __alloc_pages_noprof+0x31f/0x7b0 mm/page_alloc.c:5258 __folio_alloc_noprof+0x14/0x80 mm/page_alloc.c:5291 __folio_alloc_node_noprof include/linux/gfp.h:280 [inline] folio_alloc_noprof include/linux/gfp.h:322 [inline] filemap_alloc_folio_noprof include/linux/pagemap.h:674 [inline] __filemap_get_folio+0x555/0xaa0 mm/filemap.c:2042 netfs_grab_folio_for_write fs/netfs/buffered_write.c:47 [inline] netfs_perform_write+0x4b2/0x1f70 fs/netfs/buffered_write.c:172 netfs_buffered_write_iter_locked+0xa3/0x1c0 fs/netfs/buffered_write.c:447 netfs_file_write_iter+0x189/0x4b0 fs/netfs/buffered_write.c:486 v9fs_file_write_iter+0xac/0xe0 fs/9p/vfs_file.c:407 do_iter_readv_writev+0x625/0x810 fs/read_write.c:-1 vfs_writev+0x485/0xcf0 fs/read_write.c:1076 do_pwritev fs/read_write.c:1177 [inline] __do_sys_pwritev2 fs/read_write.c:1236 [inline] __se_sys_pwritev2+0x1ad/0x2b0 fs/read_write.c:1227 __x64_sys_pwritev2+0xc3/0xf0 fs/read_write.c:1227 x64_sys_call+0x2938/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:329 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x58/0xf0 arch/x86/entry/common.c:83 page last free pid 15890 tgid 15888 stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1352 [inline] free_unref_folios+0xcfe/0x1680 mm/page_alloc.c:2901 folios_put_refs+0x4c9/0x5c0 mm/swap.c:1040 free_pages_and_swap_cache+0x272/0x460 mm/swap_state.c:334 __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+0x7ce/0xaf0 mm/mmu_gather.c:373 tlb_finish_mmu+0xcf/0x1d0 mm/mmu_gather.c:465 exit_mmap+0x405/0xb60 mm/mmap.c:1976 __mmput+0x93/0x320 kernel/fork.c:1349 mmput+0x55/0x170 kernel/fork.c:1372 exit_mm kernel/exit.c:574 [inline] do_exit+0x918/0x2630 kernel/exit.c:940 do_group_exit+0x22a/0x300 kernel/exit.c:1095 get_signal+0x139d/0x14f0 kernel/signal.c:2933 arch_do_signal_or_restart+0x96/0x720 arch/x86/kernel/signal.c:337 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+0x58/0xb0 kernel/entry/common.c:218 do_syscall_64+0x64/0xf0 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x76/0x7e Modules linked in: CPU: 0 UID: 0 PID: 15893 Comm: syz.2.5228 Not tainted syzkaller #0 658fd523d4664e50339751640158cdc1077a64d7 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:94 dump_stack_lvl+0x10c/0x190 lib/dump_stack.c:120 dump_stack+0x19/0x20 lib/dump_stack.c:129 bad_page+0x169/0x1c0 mm/page_alloc.c:594 free_page_is_bad_report+0x123/0x1d0 mm/page_alloc.c:1057 free_page_is_bad mm/page_alloc.c:1067 [inline] free_pages_prepare mm/page_alloc.c:1343 [inline] free_unref_page+0xe88/0xee0 mm/page_alloc.c:2842 __folio_put+0x24f/0x2a0 mm/swap.c:115 folio_put include/linux/mm.h:1589 [inline] netfs_perform_write+0x1aae/0x1f70 fs/netfs/buffered_write.c:403 netfs_buffered_write_iter_locked+0xa3/0x1c0 fs/netfs/buffered_write.c:447 netfs_file_write_iter+0x189/0x4b0 fs/netfs/buffered_write.c:486 v9fs_file_write_iter+0xac/0xe0 fs/9p/vfs_file.c:407 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x71b/0xf30 fs/read_write.c:684 ksys_write+0x141/0x250 fs/read_write.c:737 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __x64_sys_write+0x7f/0x90 fs/read_write.c:746 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x58/0xf0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fef44d8eec9 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:00007fef45c77038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fef44fe5fa0 RCX: 00007fef44d8eec9 RDX: 0000000000000018 RSI: 0000200000000380 RDI: 0000000000000007 RBP: 00007fef44e11f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fef44fe6038 R14: 00007fef44fe5fa0 R15: 00007ffece395e18