BUG: Bad page state in process syz.2.1108 pfn:5da01
page does not match folio
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x5da01
ksm flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0001768000 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 Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 10111, tgid 10111 (syz.2.1108), ts 156241371093, free_ts 155335158868
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419
alloc_pages_noprof mm/mempolicy.c:2510 [inline]
folio_alloc_noprof+0x20/0x2d0 mm/mempolicy.c:2520
filemap_alloc_folio_noprof+0x3a1/0x470 mm/filemap.c:1007
ractl_alloc_folio mm/readahead.c:186 [inline]
ra_alloc_folio mm/readahead.c:441 [inline]
page_cache_ra_order+0x4c0/0xd00 mm/readahead.c:509
do_sync_mmap_readahead mm/filemap.c:3234 [inline]
filemap_fault+0x1a43/0x26c0 mm/filemap.c:3412
__do_fault+0x10d/0x490 mm/memory.c:5169
do_shared_fault mm/memory.c:5654 [inline]
do_fault mm/memory.c:5728 [inline]
do_pte_missing mm/memory.c:4251 [inline]
handle_pte_fault mm/memory.c:6069 [inline]
__handle_mm_fault+0x374c/0x5490 mm/memory.c:6212
handle_mm_fault+0x589/0xd10 mm/memory.c:6381
do_user_addr_fault+0x60c/0x1370 arch/x86/mm/fault.c:1336
handle_page_fault arch/x86/mm/fault.c:1476 [inline]
exc_page_fault+0x5c/0xb0 arch/x86/mm/fault.c:1532
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
page last free pid 10046 tgid 10046 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
__free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706
__folio_put+0x329/0x450 mm/swap.c:112
vicodec_release+0x105/0x150 drivers/media/test-drivers/vicodec/vicodec-core.c:1953
v4l2_release+0x235/0x460 drivers/media/v4l2-core/v4l2-dev.c:458
__fput+0x402/0xb70 fs/file_table.c:465
task_work_run+0x14d/0x240 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x3f6/0x4c0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Modules linked in:
CPU: 2 UID: 0 PID: 10114 Comm: syz.2.1108 Not tainted 6.16.0-rc6-syzkaller-00121-g6832a9317eee #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 lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120
bad_page+0xcf/0x220 mm/page_alloc.c:506
free_tail_page_prepare+0x44f/0x5b0 mm/page_alloc.c:991
free_pages_prepare mm/page_alloc.c:1224 [inline]
__free_frozen_pages+0xc02/0x1180 mm/page_alloc.c:2706
__folio_put+0x329/0x450 mm/swap.c:112
folio_put_refs include/linux/mm.h:1376 [inline]
filemap_free_folio+0x132/0x170 mm/filemap.c:235
delete_from_page_cache_batch+0x741/0x9b0 mm/filemap.c:339
truncate_inode_pages_range+0x279/0xe50 mm/truncate.c:380
kill_bdev block/bdev.c:91 [inline]
blkdev_flush_mapping+0xfb/0x290 block/bdev.c:712
blkdev_put_whole+0xc4/0xf0 block/bdev.c:719
bdev_release+0x47e/0x6d0 block/bdev.c:1144
blkdev_release+0x15/0x20 block/fops.c:684
__fput+0x402/0xb70 fs/file_table.c:465
task_work_run+0x14d/0x240 kernel/task_work.c:227
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x86c/0x2bd0 kernel/exit.c:964
__do_sys_exit kernel/exit.c:1072 [inline]
__se_sys_exit kernel/exit.c:1070 [inline]
__x64_sys_exit+0x42/0x50 kernel/exit.c:1070
x64_sys_call+0xea3/0x1730 arch/x86/include/generated/asm/syscalls_64.h:61
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff90bb8e9a9
Code: Unable to access opcode bytes at 0x7ff90bb8e97f.
RSP: 002b:00007ff90c9d5f08 EFLAGS: 00000246 ORIG_RAX: 000000000000003c
RAX: ffffffffffffffda RBX: 0000000000000058 RCX: 00007ff90bb8e9a9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ff90bc10ca1 R08: 0000000000000058 R09: 0000000000000058
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007ff90bdb6080 R15: 00007ffd3bea7fe8
BUG: Bad page state in process syz.2.1108 pfn:5da00
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5da00
head: order:0 mapcount:0 entire_mapcount:1 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 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 Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 10111, tgid 10111 (syz.2.1108), ts 156241371093, free_ts 155335158868
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419
alloc_pages_noprof mm/mempolicy.c:2510 [inline]
folio_alloc_noprof+0x20/0x2d0 mm/mempolicy.c:2520
filemap_alloc_folio_noprof+0x3a1/0x470 mm/filemap.c:1007
ractl_alloc_folio mm/readahead.c:186 [inline]
ra_alloc_folio mm/readahead.c:441 [inline]
page_cache_ra_order+0x4c0/0xd00 mm/readahead.c:509
do_sync_mmap_readahead mm/filemap.c:3234 [inline]
filemap_fault+0x1a43/0x26c0 mm/filemap.c:3412
__do_fault+0x10d/0x490 mm/memory.c:5169
do_shared_fault mm/memory.c:5654 [inline]
do_fault mm/memory.c:5728 [inline]
do_pte_missing mm/memory.c:4251 [inline]
handle_pte_fault mm/memory.c:6069 [inline]
__handle_mm_fault+0x374c/0x5490 mm/memory.c:6212
handle_mm_fault+0x589/0xd10 mm/memory.c:6381
do_user_addr_fault+0x60c/0x1370 arch/x86/mm/fault.c:1336
handle_page_fault arch/x86/mm/fault.c:1476 [inline]
exc_page_fault+0x5c/0xb0 arch/x86/mm/fault.c:1532
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
page last free pid 10046 tgid 10046 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
__free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706
__folio_put+0x329/0x450 mm/swap.c:112
vicodec_release+0x105/0x150 drivers/media/test-drivers/vicodec/vicodec-core.c:1953
v4l2_release+0x235/0x460 drivers/media/v4l2-core/v4l2-dev.c:458
__fput+0x402/0xb70 fs/file_table.c:465
task_work_run+0x14d/0x240 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x3f6/0x4c0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Modules linked in:
CPU: 3 UID: 0 PID: 10114 Comm: syz.2.1108 Tainted: G B 6.16.0-rc6-syzkaller-00121-g6832a9317eee #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 lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120
bad_page+0xcf/0x220 mm/page_alloc.c:506
free_page_is_bad mm/page_alloc.c:939 [inline]
free_page_is_bad mm/page_alloc.c:933 [inline]
free_pages_prepare mm/page_alloc.c:1240 [inline]
__free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706
__folio_put+0x329/0x450 mm/swap.c:112
folio_put_refs include/linux/mm.h:1376 [inline]
filemap_free_folio+0x132/0x170 mm/filemap.c:235
delete_from_page_cache_batch+0x741/0x9b0 mm/filemap.c:339
truncate_inode_pages_range+0x279/0xe50 mm/truncate.c:380
kill_bdev block/bdev.c:91 [inline]
blkdev_flush_mapping+0xfb/0x290 block/bdev.c:712
blkdev_put_whole+0xc4/0xf0 block/bdev.c:719
bdev_release+0x47e/0x6d0 block/bdev.c:1144
blkdev_release+0x15/0x20 block/fops.c:684
__fput+0x402/0xb70 fs/file_table.c:465
task_work_run+0x14d/0x240 kernel/task_work.c:227
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x86c/0x2bd0 kernel/exit.c:964
__do_sys_exit kernel/exit.c:1072 [inline]
__se_sys_exit kernel/exit.c:1070 [inline]
__x64_sys_exit+0x42/0x50 kernel/exit.c:1070
x64_sys_call+0xea3/0x1730 arch/x86/include/generated/asm/syscalls_64.h:61
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff90bb8e9a9
Code: Unable to access opcode bytes at 0x7ff90bb8e97f.
RSP: 002b:00007ff90c9d5f08 EFLAGS: 00000246 ORIG_RAX: 000000000000003c
RAX: ffffffffffffffda RBX: 0000000000000058 RCX: 00007ff90bb8e9a9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ff90bc10ca1 R08: 0000000000000058 R09: 0000000000000058
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007ff90bdb6080 R15: 00007ffd3bea7fe8