loop0: detected capacity change from 0 to 32768 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,metadata_checksum=none,data_checksum=none,compression=lz4,foreground_target=invalid label 767,background_target=invalid device 7,nojournal_transaction_names allowing incompatible features above 0.0: (unknown version) features: lz4,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes bcachefs (loop0): Using encoding defined by superblock: utf8-12.1.0 bcachefs (loop0): initializing new filesystem bcachefs (loop0): going read-write bcachefs (loop0): marking superblocks bcachefs (loop0): initializing freespace bcachefs (loop0): done initializing freespace bcachefs (loop0): reading snapshots table bcachefs (loop0): reading snapshots done bcachefs (loop0): done starting filesystem page: refcount:35 mapcount:0 mapping:ffff88805311d150 index:0x220 pfn:0x56140 head: order:5 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88801bee8d00 aops:bch_address_space_operations ino:1003 dentry name(?):"bus" flags: 0x4fff600000040e9(locked|waiters|uptodate|lru|private|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff600000040e9 ffffea000151be08 ffff8880304f8b20 ffff88805311d150 raw: 0000000000000220 ffff88805239f000 00000023ffffffff ffff88801bee8d00 head: 04fff600000040e9 ffffea000151be08 ffff8880304f8b20 ffff88805311d150 head: 0000000000000220 ffff88805239f000 00000023ffffffff ffff88801bee8d00 head: 04fff00000000205 ffffea0001585001 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000020 page dumped because: VM_WARN_ON_FOLIO((_Generic((page + nr_pages - 1), const struct page *: (const struct folio *)_compound_head(page + nr_pages - 1), struct page *: (struct folio *)_compound_head(page + nr_pages - 1))) != folio) page_owner tracks the page as allocated page last allocated via order 5, migratetype Movable, gfp_mask 0x152c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5336, tgid 5335 (syz.0.0), ts 68908676261, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2510 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2520 filemap_alloc_folio_noprof+0xdf/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+0x5e5/0xc70 mm/readahead.c:509 do_async_mmap_readahead mm/filemap.c:3299 [inline] filemap_fault+0x59e/0x1200 mm/filemap.c:3398 bch2_page_fault+0x3e8/0x7a0 fs/bcachefs/fs-io-pagecache.c:594 __do_fault+0x138/0x390 mm/memory.c:5169 do_read_fault mm/memory.c:5590 [inline] do_fault mm/memory.c:5724 [inline] do_pte_missing mm/memory.c:4251 [inline] handle_pte_fault mm/memory.c:6069 [inline] __handle_mm_fault+0x37ed/0x5620 mm/memory.c:6212 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6381 faultin_page mm/gup.c:1186 [inline] __get_user_pages+0x1af4/0x30b0 mm/gup.c:1488 populate_vma_page_range+0x26b/0x340 mm/gup.c:1926 __mm_populate+0x24c/0x380 mm/gup.c:2029 page_owner free stack trace missing ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5336 at ./include/linux/rmap.h:427 __folio_rmap_sanity_checks+0x46d/0x700 include/linux/rmap.h:427 Modules linked in: CPU: 0 UID: 0 PID: 5336 Comm: syz.0.0 Not tainted 6.16.0-rc4-syzkaller-00123-g4c06e63b9203 #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 RIP: 0010:__folio_rmap_sanity_checks+0x46d/0x700 include/linux/rmap.h:427 Code: e9 00 fd ff ff e8 33 c6 ad ff 49 ff cc 44 89 f5 e9 5a fd ff ff e8 23 c6 ad ff 48 89 df 48 c7 c6 e0 6d 96 8b e8 04 6c f5 ff 90 <0f> 0b 90 e9 50 fd ff ff e8 06 c6 ad ff 48 89 df 48 c7 c6 40 6f 96 RSP: 0018:ffffc9000ee7f448 EFLAGS: 00010246 RAX: 1750085a1d070900 RBX: ffffea0001585000 RCX: 1750085a1d070900 RDX: 0000000000000005 RSI: ffffffff8db84723 RDI: ffff8880335f8000 RBP: 00000000000001e0 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff1bfa9fc R12: ffffea000158c7c0 R13: dffffc0000000000 R14: 0000000000000000 R15: ffffea0001585000 FS: 00007fec87bc06c0(0000) GS:ffff88808d21c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000000000c0 CR3: 000000003f9ad000 CR4: 0000000000352ef0 Call Trace: __folio_add_rmap mm/rmap.c:1252 [inline] __folio_add_file_rmap mm/rmap.c:1620 [inline] folio_add_file_rmap_ptes+0x7c/0x900 mm/rmap.c:1642 set_pte_range+0x3cc/0x700 mm/memory.c:5328 filemap_map_folio_range mm/filemap.c:3640 [inline] filemap_map_pages+0xd56/0x1740 mm/filemap.c:3749 do_fault_around mm/memory.c:5548 [inline] do_read_fault mm/memory.c:5581 [inline] do_fault mm/memory.c:5724 [inline] do_pte_missing mm/memory.c:4251 [inline] handle_pte_fault mm/memory.c:6069 [inline] __handle_mm_fault+0x368a/0x5620 mm/memory.c:6212 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6381 faultin_page mm/gup.c:1186 [inline] __get_user_pages+0x1af4/0x30b0 mm/gup.c:1488 populate_vma_page_range+0x26b/0x340 mm/gup.c:1926 __mm_populate+0x24c/0x380 mm/gup.c:2029 mm_populate include/linux/mm.h:3348 [inline] vm_mmap_pgoff+0x3f0/0x4c0 mm/util.c:584 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:607 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec86d8e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fec87bc0038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007fec86fb5fa0 RCX: 00007fec86d8e929 RDX: 0000000000000002 RSI: 0000000000b36000 RDI: 0000200000000000 RBP: 00007fec86e10b39 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000028011 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec86fb5fa0 R15: 00007ffc76c6e068