BUG: Bad page state in process syz-executor pfn:6123c page:ffffea0001848f00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x4 pfn:0x6123c flags: 0xfff00000002006(referenced|uptodate|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002006 ffffea000189d588 ffffc90002eb79c0 0000000000000000 raw: 0000000000000004 ffff888075421ba0 00000000ffffffff 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x100c40(GFP_NOFS|__GFP_HARDWALL), pid 5151, ts 109167583817, free_ts 108457418969 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192 __alloc_pages+0x272/0x700 mm/page_alloc.c:5464 __page_cache_alloc+0xd4/0x4a0 mm/filemap.c:1022 do_read_cache_page+0x1e5/0x1040 mm/filemap.c:3457 read_mapping_page include/linux/pagemap.h:515 [inline] __get_metapage+0x398/0x1070 fs/jfs/jfs_metapage.c:621 dbAllocCtl+0xd5/0x920 fs/jfs/jfs_dmap.c:1884 dbAllocAG+0x28b/0x10b0 fs/jfs/jfs_dmap.c:1432 dbDiscardAG+0x34e/0xa10 fs/jfs/jfs_dmap.c:1681 jfs_ioc_trim+0x452/0x6a0 fs/jfs/jfs_discard.c:105 jfs_ioctl+0x2ac/0x3a0 fs/jfs/ioctl.c:132 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433 release_pages+0x1bb9/0x1f40 mm/swap.c:963 __pagevec_release+0x80/0xf0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] __invalidate_mapping_pages+0x68f/0x7c0 mm/truncate.c:509 btrfs_close_bdev fs/btrfs/volumes.c:1150 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1174 [inline] close_fs_devices+0x41e/0x8e0 fs/btrfs/volumes.c:1217 btrfs_close_devices+0xc4/0x5c0 fs/btrfs/volumes.c:1232 close_ctree+0x759/0x8b0 fs/btrfs/disk-io.c:4529 generic_shutdown_super+0x130/0x310 fs/super.c:475 kill_anon_super+0x37/0x60 fs/super.c:1089 btrfs_kill_super+0x3d/0x50 fs/btrfs/super.c:2391 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 Modules linked in: CPU: 0 PID: 4166 Comm: syz-executor Not tainted 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 bad_page+0x14b/0x170 mm/page_alloc.c:652 check_free_page_bad mm/page_alloc.c:1199 [inline] check_free_page mm/page_alloc.c:1209 [inline] free_pages_prepare mm/page_alloc.c:1334 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x48d/0xcf0 mm/page_alloc.c:3317 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433 release_pages+0x1bb9/0x1f40 mm/swap.c:963 __pagevec_release+0x80/0xf0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x48b/0x1290 mm/truncate.c:329 dbUnmount+0x111/0x180 fs/jfs/jfs_dmap.c:275 jfs_umount+0x1fe/0x370 fs/jfs/jfs_umount.c:89 jfs_put_super+0x86/0x180 fs/jfs/super.c:194 generic_shutdown_super+0x130/0x310 fs/super.c:475 kill_block_super+0x7a/0xe0 fs/super.c:1427 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f260f0c8b47 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:00007fff31450d88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f260f13a5fc RCX: 00007f260f0c8b47 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007fff31450e40 RBP: 00007fff31450e40 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007fff31451ec0 R13: 00007f260f13a5fc R14: 000000000001a7a5 R15: 00007fff31451f00 BUG: Bad page state in process syz-executor pfn:62756 page:ffffea000189d580 refcount:0 mapcount:0 mapping:0000000000000000 index:0x3 pfn:0x62756 flags: 0xfff00000002006(referenced|uptodate|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002006 ffffea0000815cc8 ffffc90002eb79c0 0000000000000000 raw: 0000000000000003 ffff888075421c98 00000000ffffffff 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x100c40(GFP_NOFS|__GFP_HARDWALL), pid 5151, ts 109182184354, free_ts 108457396575 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192 __alloc_pages+0x272/0x700 mm/page_alloc.c:5464 __page_cache_alloc+0xd4/0x4a0 mm/filemap.c:1022 do_read_cache_page+0x1e5/0x1040 mm/filemap.c:3457 read_mapping_page include/linux/pagemap.h:515 [inline] __get_metapage+0x398/0x1070 fs/jfs/jfs_metapage.c:621 dbAdjCtl+0x138/0x9c0 fs/jfs/jfs_dmap.c:2549 dbAllocDmap fs/jfs/jfs_dmap.c:2110 [inline] dbAllocDmapLev+0x298/0x490 fs/jfs/jfs_dmap.c:2054 dbAllocCtl+0x113/0x920 fs/jfs/jfs_dmap.c:1891 dbAllocAG+0x28b/0x10b0 fs/jfs/jfs_dmap.c:1432 dbDiscardAG+0x34e/0xa10 fs/jfs/jfs_dmap.c:1681 jfs_ioc_trim+0x452/0x6a0 fs/jfs/jfs_discard.c:105 jfs_ioctl+0x2ac/0x3a0 fs/jfs/ioctl.c:132 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433 release_pages+0x1bb9/0x1f40 mm/swap.c:963 __pagevec_release+0x80/0xf0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] __invalidate_mapping_pages+0x68f/0x7c0 mm/truncate.c:509 btrfs_close_bdev fs/btrfs/volumes.c:1150 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1174 [inline] close_fs_devices+0x41e/0x8e0 fs/btrfs/volumes.c:1217 btrfs_close_devices+0xc4/0x5c0 fs/btrfs/volumes.c:1232 close_ctree+0x759/0x8b0 fs/btrfs/disk-io.c:4529 generic_shutdown_super+0x130/0x310 fs/super.c:475 kill_anon_super+0x37/0x60 fs/super.c:1089 btrfs_kill_super+0x3d/0x50 fs/btrfs/super.c:2391 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 Modules linked in: CPU: 1 PID: 4166 Comm: syz-executor Tainted: G B 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 bad_page+0x14b/0x170 mm/page_alloc.c:652 check_free_page_bad mm/page_alloc.c:1199 [inline] check_free_page mm/page_alloc.c:1209 [inline] free_pages_prepare mm/page_alloc.c:1334 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x48d/0xcf0 mm/page_alloc.c:3317 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433 release_pages+0x1bb9/0x1f40 mm/swap.c:963 __pagevec_release+0x80/0xf0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x48b/0x1290 mm/truncate.c:329 dbUnmount+0x111/0x180 fs/jfs/jfs_dmap.c:275 jfs_umount+0x1fe/0x370 fs/jfs/jfs_umount.c:89 jfs_put_super+0x86/0x180 fs/jfs/super.c:194 generic_shutdown_super+0x130/0x310 fs/super.c:475 kill_block_super+0x7a/0xe0 fs/super.c:1427 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f260f0c8b47 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:00007fff31450d88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f260f13a5fc RCX: 00007f260f0c8b47 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007fff31450e40 RBP: 00007fff31450e40 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007fff31451ec0 R13: 00007f260f13a5fc R14: 000000000001a7a5 R15: 00007fff31451f00