BUG: Bad page state in process syz-executor239 pfn:48e01 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x48e01 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001238000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5311, tgid 5311 (syz-executor239), ts 81047033062, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page_owner free stack trace missing Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Not tainted 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000139e5 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:48e00 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x48e00 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5311, tgid 5311 (syz-executor239), ts 81047033062, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page_owner free stack trace missing Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000139e5 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:49401 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x49401 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001250000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5321, tgid 5321 (syz-executor239), ts 81825332218, free_ts 81409548855 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000013e41 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:49400 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x49400 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5321, tgid 5321 (syz-executor239), ts 81825332218, free_ts 81409548855 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000013e41 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:49601 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x49601 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001258000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5330, tgid 5330 (syz-executor239), ts 82664757909, free_ts 82397312655 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000014179 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:49600 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x49600 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5330, tgid 5330 (syz-executor239), ts 82664757909, free_ts 82397312655 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000014179 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:49e01 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x49e01 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001278000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5339, tgid 5339 (syz-executor239), ts 83529177427, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page_owner free stack trace missing Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000144e3 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:49e00 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x49e00 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5339, tgid 5339 (syz-executor239), ts 83529177427, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page_owner free stack trace missing Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000144e3 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:49c01 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x49c01 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001270000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5348, tgid 5348 (syz-executor239), ts 84286219754, free_ts 83098554029 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000147d8 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:49c00 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x49c00 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5348, tgid 5348 (syz-executor239), ts 84286219754, free_ts 83098554029 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000147d8 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:4a001 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x4a001 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001280000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5357, tgid 5357 (syz-executor239), ts 85135223427, free_ts 84704557082 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000014b22 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:4a000 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4a000 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5357, tgid 5357 (syz-executor239), ts 85135223427, free_ts 84704557082 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000014b22 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:4a201 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x4a201 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001288000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5366, tgid 5366 (syz-executor239), ts 85984231949, free_ts 85557890378 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000014e72 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:4a200 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4a200 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5366, tgid 5366 (syz-executor239), ts 85984231949, free_ts 85557890378 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000014e72 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:4a401 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x4a401 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001290000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5375, tgid 5375 (syz-executor239), ts 86808878256, free_ts 86399751758 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000151b1 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:4a400 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4a400 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5375, tgid 5375 (syz-executor239), ts 86808878256, free_ts 86399751758 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000151b1 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:4a601 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x4a601 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001298000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5384, tgid 5384 (syz-executor239), ts 87648616711, free_ts 87386332113 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000154fe RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:4a600 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4a600 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5384, tgid 5384 (syz-executor239), ts 87648616711, free_ts 87386332113 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00000000000154fe RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:4a801 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x4a801 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea00012a0000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5393, tgid 5393 (syz-executor239), ts 88492097721, free_ts 88058835345 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 000000000001583b RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:4a800 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4a800 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5393, tgid 5393 (syz-executor239), ts 88492097721, free_ts 88058835345 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 000000000001583b RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:4aa01 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x4aa01 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea00012a8000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5402, tgid 5402 (syz-executor239), ts 89329110565, free_ts 88906503680 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000015b86 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:4aa00 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4aa00 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5402, tgid 5402 (syz-executor239), ts 89329110565, free_ts 88906503680 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000015b86 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 BUG: Bad page state in process syz-executor239 pfn:4ac01 page does not match folio page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x4ac01 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea00012b0000 00000000ffffffff ffffffffffffffff raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero pincount page_owner tracks the page as allocated page last allocated via order 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5412, tgid 5412 (syz-executor239), ts 90173793130, free_ts 89752196545 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1 free_pages_prepare mm/page_alloc.c:1234 [inline] __free_frozen_pages+0x799/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000015ed2 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 BUG: Bad page state in process syz-executor239 pfn:4ac00 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4ac00 head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0 flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000 head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 head: 04fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 head: ffffffffffffffff 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 9, migratetype Movable, gfp_mask 0x153c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_WRITE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5412, tgid 5412 (syz-executor239), ts 90173793130, free_ts 89752196545 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007 __filemap_get_folio+0x3f2/0xaf0 mm/filemap.c:1969 iomap_get_folio fs/iomap/buffered-io.c:606 [inline] __iomap_get_folio fs/iomap/buffered-io.c:752 [inline] iomap_write_begin+0x4a3/0x18f0 fs/iomap/buffered-io.c:795 iomap_write_iter fs/iomap/buffered-io.c:952 [inline] iomap_file_buffered_write+0x3fe/0xd20 fs/iomap/buffered-io.c:1033 xfs_file_buffered_write+0x201/0x890 fs/xfs/xfs_file.c:910 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5310 tgid 5310 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] free_unref_folios+0xb81/0x14a0 mm/page_alloc.c:2778 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:379 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 0 UID: 0 PID: 5310 Comm: syz-executor239 Tainted: G B 6.15.0-rc7-syzkaller-00002-gb36ddb9210e6 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 bad_page+0x15e/0x1a0 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:949 [inline] free_pages_prepare mm/page_alloc.c:1250 [inline] __free_frozen_pages+0xc80/0xcd0 mm/page_alloc.c:2721 __folio_put+0x21b/0x2c0 mm/swap.c:112 delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339 truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:376 xfs_fs_evict_inode+0x67/0x90 fs/xfs/xfs_super.c:778 evict+0x501/0x9c0 fs/inode.c:810 dispose_list fs/inode.c:852 [inline] evict_inodes+0x636/0x6c0 fs/inode.c:906 generic_shutdown_super+0x9a/0x2c0 fs/super.c:627 kill_block_super+0x44/0x90 fs/super.c:1710 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2246 deactivate_locked_super+0xb9/0x130 fs/super.c:473 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1431 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc008e2e647 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffec1577f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000015ed2 RCX: 00007fc008e2e647 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffec1578010 RBP: 00007ffec1578010 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffec1579080 R13: 00005555904bb6c0 R14: 431bde82d7b634db R15: 00007ffec15790a0 XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791