BUG: Bad page state in process syz.0.0 pfn:54801
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x54801
head: order:0 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:-1
flags: 0x4fff0000000004d(locked|referenced|uptodate|head|node=1|zone=1|lastcpupid=0x7ff)
raw: 04fff00000000000 ffffea0001520001 ffffffffffffffff ffffffff00000000
raw: 0000000000000200 0000000000000000 00000000ffffffff 0000000000000000
head: 04fff0000000004d dead000000000100 dead000000000122 0000000000000000
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
head: 04fff00000000000 ffffea0001520001 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 5317, tgid 5316 (syz.0.0), ts 69421546371, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558
prep_new_page mm/page_alloc.c:1566 [inline]
get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269
alloc_pages_noprof mm/mempolicy.c:2348 [inline]
folio_alloc_noprof+0x128/0x180 mm/mempolicy.c:2355
filemap_alloc_folio_noprof+0xdf/0x500 mm/filemap.c:1009
__filemap_get_folio+0x41f/0x940 mm/filemap.c:1951
iomap_get_folio fs/iomap/buffered-io.c:608 [inline]
__iomap_get_folio fs/iomap/buffered-io.c:754 [inline]
iomap_write_begin+0x4d3/0x1990 fs/iomap/buffered-io.c:797
iomap_write_iter fs/iomap/buffered-io.c:955 [inline]
iomap_file_buffered_write+0x6ea/0x11c0 fs/iomap/buffered-io.c:1039
xfs_file_buffered_write+0x2de/0xac0 fs/xfs/xfs_file.c:792
new_sync_write fs/read_write.c:586 [inline]
vfs_write+0xaeb/0xd30 fs/read_write.c:679
ksys_write+0x18f/0x2b0 fs/read_write.c:731
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page_owner free stack trace missing
Modules linked in:
CPU: 0 UID: 0 PID: 5316 Comm: syz.0.0 Not tainted 6.13.0-rc4-syzkaller-00069-g8379578b11d5 #0
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 lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
bad_page+0x176/0x1d0 mm/page_alloc.c:501
free_tail_page_prepare+0x2ab/0x4b0
free_pages_prepare mm/page_alloc.c:1103 [inline]
free_unref_page+0x7f1/0x1010 mm/page_alloc.c:2659
__folio_put+0x2b3/0x360 mm/swap.c:112
delete_from_page_cache_batch+0x8f5/0xa60 mm/filemap.c:350
truncate_inode_pages_range+0x36b/0x10e0 mm/truncate.c:327
evict+0x4fd/0x9a0 fs/inode.c:798
dispose_list fs/inode.c:845 [inline]
evict_inodes+0x6f6/0x790 fs/inode.c:899
generic_shutdown_super+0xa0/0x2d0 fs/super.c:627
kill_block_super+0x44/0x90 fs/super.c:1710
xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2089
deactivate_locked_super+0xc4/0x130 fs/super.c:473
cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1373
task_work_run+0x24f/0x310 kernel/task_work.c:239
exit_task_work include/linux/task_work.h:43 [inline]
do_exit+0xa2a/0x28e0 kernel/exit.c:938
do_group_exit+0x207/0x2c0 kernel/exit.c:1087
__do_sys_exit_group kernel/exit.c:1098 [inline]
__se_sys_exit_group kernel/exit.c:1096 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096
x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbed6785d29
Code: Unable to access opcode bytes at 0x7fbed6785cff.
RSP: 002b:00007ffd012acef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fbed6785d29
RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000003 R08: 00007ffd012acfdf R09: 00007fbed6945260
R10: 0000000000000001 R11: 0000000000000246 R12: 00007fbed6945f68
R13: 00007fbed6945260 R14: 00007ffd012acfa0 R15: 00007ffd012acfa0
BUG: Bad page state in process syz.0.0 pfn:54800
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x54800
head: order:0 mapcount:0 entire_mapcount:0 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 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 5317, tgid 5316 (syz.0.0), ts 69421546371, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558
prep_new_page mm/page_alloc.c:1566 [inline]
get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269
alloc_pages_noprof mm/mempolicy.c:2348 [inline]
folio_alloc_noprof+0x128/0x180 mm/mempolicy.c:2355
filemap_alloc_folio_noprof+0xdf/0x500 mm/filemap.c:1009
__filemap_get_folio+0x41f/0x940 mm/filemap.c:1951
iomap_get_folio fs/iomap/buffered-io.c:608 [inline]
__iomap_get_folio fs/iomap/buffered-io.c:754 [inline]
iomap_write_begin+0x4d3/0x1990 fs/iomap/buffered-io.c:797
iomap_write_iter fs/iomap/buffered-io.c:955 [inline]
iomap_file_buffered_write+0x6ea/0x11c0 fs/iomap/buffered-io.c:1039
xfs_file_buffered_write+0x2de/0xac0 fs/xfs/xfs_file.c:792
new_sync_write fs/read_write.c:586 [inline]
vfs_write+0xaeb/0xd30 fs/read_write.c:679
ksys_write+0x18f/0x2b0 fs/read_write.c:731
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page_owner free stack trace missing
Modules linked in:
CPU: 0 UID: 0 PID: 5316 Comm: syz.0.0 Tainted: G B 6.13.0-rc4-syzkaller-00069-g8379578b11d5 #0
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 lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
bad_page+0x176/0x1d0 mm/page_alloc.c:501
free_page_is_bad mm/page_alloc.c:923 [inline]
free_pages_prepare mm/page_alloc.c:1119 [inline]
free_unref_page+0xfb1/0x1010 mm/page_alloc.c:2659
__folio_put+0x2b3/0x360 mm/swap.c:112
delete_from_page_cache_batch+0x8f5/0xa60 mm/filemap.c:350
truncate_inode_pages_range+0x36b/0x10e0 mm/truncate.c:327
evict+0x4fd/0x9a0 fs/inode.c:798
dispose_list fs/inode.c:845 [inline]
evict_inodes+0x6f6/0x790 fs/inode.c:899
generic_shutdown_super+0xa0/0x2d0 fs/super.c:627
kill_block_super+0x44/0x90 fs/super.c:1710
xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2089
deactivate_locked_super+0xc4/0x130 fs/super.c:473
cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1373
task_work_run+0x24f/0x310 kernel/task_work.c:239
exit_task_work include/linux/task_work.h:43 [inline]
do_exit+0xa2a/0x28e0 kernel/exit.c:938
do_group_exit+0x207/0x2c0 kernel/exit.c:1087
__do_sys_exit_group kernel/exit.c:1098 [inline]
__se_sys_exit_group kernel/exit.c:1096 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096
x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbed6785d29
Code: Unable to access opcode bytes at 0x7fbed6785cff.
RSP: 002b:00007ffd012acef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fbed6785d29
RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000003 R08: 00007ffd012acfdf R09: 00007fbed6945260
R10: 0000000000000001 R11: 0000000000000246 R12: 00007fbed6945f68
R13: 00007fbed6945260 R14: 00007ffd012acfa0 R15: 00007ffd012acfa0
XFS (loop0): Unmounting Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791