BUG: Bad page state in process syz-executor pfn:42601
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x42601
head: order:0 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:-1
flags: 0xfff0000000004d(locked|referenced|uptodate|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0001098001 ffffffffffffffff ffffffff00000000
raw: 0000000000000200 0000000000000000 00000000ffffffff 0000000000000000
head: 00fff0000000004d dead000000000100 dead000000000122 0000000000000000
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
head: 00fff00000000000 ffffea0001098001 ffffffffffffffff ffffffff00000000
head: 0000000000000200 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_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE|__GFP_WRITE), pid 10624, tgid 10623 (syz.4.1343), ts 502011928039, free_ts 30782984001
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556
prep_new_page mm/page_alloc.c:1564 [inline]
get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4750
alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
folio_alloc_noprof+0x1e/0xc0 mm/mempolicy.c:2352
filemap_alloc_folio_noprof+0x3b4/0x480 mm/filemap.c:1010
__filemap_get_folio+0x422/0xaf0 mm/filemap.c:1952
__iomap_get_folio fs/iomap/buffered-io.c:754 [inline]
iomap_write_begin+0x693/0x1660 fs/iomap/buffered-io.c:797
iomap_write_iter fs/iomap/buffered-io.c:955 [inline]
iomap_file_buffered_write+0x419/0xc70 fs/iomap/buffered-io.c:1039
xfs_file_buffered_write+0x206/0xa60 fs/xfs/xfs_file.c:792
xfs_file_write_iter+0x53c/0x740 fs/xfs/xfs_file.c:867
new_sync_write fs/read_write.c:590 [inline]
vfs_write+0x5b1/0x1150 fs/read_write.c:683
ksys_write+0x12f/0x260 fs/read_write.c:736
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 1 tgid 1 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1127 [inline]
free_unref_page+0x661/0x1080 mm/page_alloc.c:2657
free_contig_range+0x133/0x3f0 mm/page_alloc.c:6765
destroy_args+0xa87/0xe60 mm/debug_vm_pgtable.c:1017
debug_vm_pgtable+0x168e/0x31a0 mm/debug_vm_pgtable.c:1397
do_one_initcall+0x12b/0x700 init/main.c:1269
do_initcall_level init/main.c:1331 [inline]
do_initcalls init/main.c:1347 [inline]
do_basic_setup init/main.c:1366 [inline]
kernel_init_freeable+0x5c7/0x900 init/main.c:1580
kernel_init+0x1c/0x2b0 init/main.c:1469
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Modules linked in:
CPU: 0 UID: 0 PID: 5839 Comm: syz-executor Not tainted 6.12.0-rc7-syzkaller-00187-gf868cd251776 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120
bad_page+0xb3/0x1f0 mm/page_alloc.c:501
free_tail_page_prepare+0x2f0/0x560 mm/page_alloc.c:963
free_pages_prepare mm/page_alloc.c:1103 [inline]
free_unref_page+0x8ed/0x1080 mm/page_alloc.c:2657
__folio_put+0x32a/0x450 mm/swap.c:112
folio_put_refs include/linux/mm.h:1498 [inline]
filemap_free_folio+0x196/0x1e0 mm/filemap.c:247
delete_from_page_cache_batch+0x738/0x990 mm/filemap.c:351
truncate_inode_pages_range+0x29b/0xe80 mm/truncate.c:343
evict+0x7cc/0x970 fs/inode.c:727
dispose_list+0x117/0x1e0 fs/inode.c:774
evict_inodes+0x39d/0x4b0 fs/inode.c:828
generic_shutdown_super+0xb8/0x3d0 fs/super.c:627
kill_block_super+0x3b/0x90 fs/super.c:1710
xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2056
deactivate_locked_super+0xc1/0x1a0 fs/super.c:473
deactivate_super+0xde/0x100 fs/super.c:506
cleanup_mnt+0x222/0x450 fs/namespace.c:1373
task_work_run+0x151/0x250 kernel/task_work.c:239
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x27b/0x2a0 kernel/entry/common.c:218
do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0029d7fa47
Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffcf2d3a048 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f0029d7fa47
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffcf2d3a100
RBP: 00007ffcf2d3a100 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffcf2d3b180
R13: 00007f0029df15fc R14: 0000000000079db1 R15: 00007ffcf2d3b1c0
BUG: Bad page state in process syz-executor pfn:42600
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x42600
head: order:0 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff0000000004d(locked|referenced|uptodate|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff0000000004d dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
head: 00fff0000000004d dead000000000100 dead000000000122 0000000000000000
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
head: 00fff00000000000 0000000000000000 ffffffffffffffff 0000000000000000
head: 0000000000000200 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_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE|__GFP_WRITE), pid 10624, tgid 10623 (syz.4.1343), ts 502011928039, free_ts 30782977511
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556
prep_new_page mm/page_alloc.c:1564 [inline]
get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4750
alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
folio_alloc_noprof+0x1e/0xc0 mm/mempolicy.c:2352
filemap_alloc_folio_noprof+0x3b4/0x480 mm/filemap.c:1010
__filemap_get_folio+0x422/0xaf0 mm/filemap.c:1952
__iomap_get_folio fs/iomap/buffered-io.c:754 [inline]
iomap_write_begin+0x693/0x1660 fs/iomap/buffered-io.c:797
iomap_write_iter fs/iomap/buffered-io.c:955 [inline]
iomap_file_buffered_write+0x419/0xc70 fs/iomap/buffered-io.c:1039
xfs_file_buffered_write+0x206/0xa60 fs/xfs/xfs_file.c:792
xfs_file_write_iter+0x53c/0x740 fs/xfs/xfs_file.c:867
new_sync_write fs/read_write.c:590 [inline]
vfs_write+0x5b1/0x1150 fs/read_write.c:683
ksys_write+0x12f/0x260 fs/read_write.c:736
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 1 tgid 1 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1127 [inline]
free_unref_page+0x661/0x1080 mm/page_alloc.c:2657
free_contig_range+0x133/0x3f0 mm/page_alloc.c:6765
destroy_args+0xa87/0xe60 mm/debug_vm_pgtable.c:1017
debug_vm_pgtable+0x168e/0x31a0 mm/debug_vm_pgtable.c:1397
do_one_initcall+0x12b/0x700 init/main.c:1269
do_initcall_level init/main.c:1331 [inline]
do_initcalls init/main.c:1347 [inline]
do_basic_setup init/main.c:1366 [inline]
kernel_init_freeable+0x5c7/0x900 init/main.c:1580
kernel_init+0x1c/0x2b0 init/main.c:1469
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Modules linked in:
CPU: 0 UID: 0 PID: 5839 Comm: syz-executor Tainted: G B 6.12.0-rc7-syzkaller-00187-gf868cd251776 #0
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120
bad_page+0xb3/0x1f0 mm/page_alloc.c:501
free_page_is_bad_report mm/page_alloc.c:913 [inline]
free_page_is_bad mm/page_alloc.c:923 [inline]
free_pages_prepare mm/page_alloc.c:1119 [inline]
free_unref_page+0x72f/0x1080 mm/page_alloc.c:2657
__folio_put+0x32a/0x450 mm/swap.c:112
folio_put_refs include/linux/mm.h:1498 [inline]
filemap_free_folio+0x196/0x1e0 mm/filemap.c:247
delete_from_page_cache_batch+0x738/0x990 mm/filemap.c:351
truncate_inode_pages_range+0x29b/0xe80 mm/truncate.c:343
evict+0x7cc/0x970 fs/inode.c:727
dispose_list+0x117/0x1e0 fs/inode.c:774
evict_inodes+0x39d/0x4b0 fs/inode.c:828
generic_shutdown_super+0xb8/0x3d0 fs/super.c:627
kill_block_super+0x3b/0x90 fs/super.c:1710
xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2056
deactivate_locked_super+0xc1/0x1a0 fs/super.c:473
deactivate_super+0xde/0x100 fs/super.c:506
cleanup_mnt+0x222/0x450 fs/namespace.c:1373
task_work_run+0x151/0x250 kernel/task_work.c:239
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x27b/0x2a0 kernel/entry/common.c:218
do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0029d7fa47
Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffcf2d3a048 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f0029d7fa47
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffcf2d3a100
RBP: 00007ffcf2d3a100 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffcf2d3b180
R13: 00007f0029df15fc R14: 0000000000079db1 R15: 00007ffcf2d3b1c0
XFS (loop4): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791