syzbot


BUG: Bad page state in __get_metapage

Status: upstream: reported C repro on 2024/10/23 12:46
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+5ef7590632a6b42d2b6c@syzkaller.appspotmail.com
First crash: 549d, last: 14h16m
Fix commit to backport (bisect log) :
tree: upstream
commit 9346476d211611f3c0d512cb6e942ab76f5376d8
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
Date: Wed Apr 17 17:56:48 2024 +0000

  jfs: Convert insert_metapage() to take a folio

  
Bug presence (3)
Date Name Commit Repro Result
2024/12/16 linux-6.1.y (ToT) 52f863f820fd C [report] BUG: Bad page state in __get_metapage
2024/10/28 upstream (ToT) 819837584309 C [report] INFO: task hung in lmLogClose
2024/12/16 upstream (ToT) 78d4f34e2115 C Didn't crash
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 BUG: Bad page state in __get_metapage origin:upstream -1 C 1349 15h35m 550d 0/3 upstream: reported C repro on 2024/10/23 03:58
linux-6.6 BUG: Bad page state in __get_metapage origin:upstream -1 C 759 12h45m 309d 0/2 upstream: reported C repro on 2025/06/20 20:02
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2025/02/03 18:07 5h54m fix candidate upstream OK (1) job log

Sample crash report:
BUG: Bad page state in process jfsCommit  pfn:73c07
page:ffffea0001cf01c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x72c pfn:0x73c07
flags: 0xfff18000002047(locked|referenced|uptodate|workingset|private|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff18000002047 dead000000000100 dead000000000122 0000000000000000
raw: 000000000000072c ffff888079469c98 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 0x140c40(GFP_NOFS|__GFP_COMP|__GFP_HARDWALL), pid 4414, tgid 4414 (syz.0.17), ts 90410363011, free_ts 90399252654
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2559
 prep_new_page mm/page_alloc.c:2566 [inline]
 get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4357
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5657
 folio_alloc+0x1c/0x60 mm/mempolicy.c:2292
 filemap_alloc_folio+0xdb/0x480 mm/filemap.c:999
 __filemap_get_folio+0x6ab/0xdb0 mm/filemap.c:1993
 pagecache_get_page+0x26/0x250 mm/folio-compat.c:110
 find_or_create_page include/linux/pagemap.h:648 [inline]
 grab_cache_page include/linux/pagemap.h:780 [inline]
 __get_metapage+0x2a4/0xfa0 fs/jfs/jfs_metapage.c:613
 dtSplitRoot+0x1de/0x14e0 fs/jfs/jfs_dtree.c:1910
 dtSplitUp fs/jfs/jfs_dtree.c:993 [inline]
 dtInsert+0xe7b/0x5950 fs/jfs/jfs_dtree.c:871
 jfs_rename+0x89a/0x1910 fs/jfs/namei.c:1224
 vfs_rename+0xbe1/0x1100 fs/namei.c:4882
 do_renameat2+0x8e5/0xce0 fs/namei.c:5035
 __do_sys_rename fs/namei.c:5081 [inline]
 __se_sys_rename fs/namei.c:5079 [inline]
 __x64_sys_rename+0x82/0x90 fs/namei.c:5079
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1486 [inline]
 free_pcp_prepare mm/page_alloc.c:1536 [inline]
 free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3413
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3508
 free_slab mm/slub.c:2036 [inline]
 discard_slab mm/slub.c:2042 [inline]
 __unfreeze_partials+0x1a5/0x200 mm/slub.c:2591
 put_cpu_partial+0x17c/0x250 mm/slub.c:2667
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 slab_alloc mm/slub.c:3367 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3374 [inline]
 kmem_cache_alloc_lru+0x11a/0x2e0 mm/slub.c:3390
 __d_alloc+0x31/0x700 fs/dcache.c:1774
 d_alloc+0x4a/0x250 fs/dcache.c:1854
 lookup_one_qstr_excl+0xc6/0x240 fs/namei.c:1609
 do_renameat2+0x4bf/0xce0 fs/namei.c:4985
 __do_sys_rename fs/namei.c:5081 [inline]
 __se_sys_rename fs/namei.c:5079 [inline]
 __x64_sys_rename+0x82/0x90 fs/namei.c:5079
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
Modules linked in:
CPU: 1 PID: 106 Comm: jfsCommit Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 bad_page+0x14b/0x170 mm/page_alloc.c:726
 free_page_is_bad mm/page_alloc.c:1318 [inline]
 free_pages_prepare mm/page_alloc.c:1479 [inline]
 free_pcp_prepare mm/page_alloc.c:1536 [inline]
 free_unref_page_prepare+0x42a/0x9a0 mm/page_alloc.c:3413
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3508
 txUnlock+0x27e/0xcb0 fs/jfs/jfs_txnmgr.c:933
 txLazyCommit fs/jfs/jfs_txnmgr.c:2683 [inline]
 jfs_lazycommit+0x56a/0xa70 fs/jfs/jfs_txnmgr.c:2733
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
page:ffffea0001cf01c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x72c pfn:0x73c07
flags: 0xfff18000002047(locked|referenced|uptodate|workingset|private|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff18000002047 dead000000000100 dead000000000122 0000000000000000
raw: 000000000000072c ffff888079469c98 00000000ffffffff 0000000000000000
page dumped because: VM_BUG_ON_FOLIO(((unsigned int) folio_ref_count(folio) + 127u <= 127u))
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x140c40(GFP_NOFS|__GFP_COMP|__GFP_HARDWALL), pid 4414, tgid 4414 (syz.0.17), ts 90410363011, free_ts 90399252654
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2559
 prep_new_page mm/page_alloc.c:2566 [inline]
 get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4357
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5657
 folio_alloc+0x1c/0x60 mm/mempolicy.c:2292
 filemap_alloc_folio+0xdb/0x480 mm/filemap.c:999
 __filemap_get_folio+0x6ab/0xdb0 mm/filemap.c:1993
 pagecache_get_page+0x26/0x250 mm/folio-compat.c:110
 find_or_create_page include/linux/pagemap.h:648 [inline]
 grab_cache_page include/linux/pagemap.h:780 [inline]
 __get_metapage+0x2a4/0xfa0 fs/jfs/jfs_metapage.c:613
 dtSplitRoot+0x1de/0x14e0 fs/jfs/jfs_dtree.c:1910
 dtSplitUp fs/jfs/jfs_dtree.c:993 [inline]
 dtInsert+0xe7b/0x5950 fs/jfs/jfs_dtree.c:871
 jfs_rename+0x89a/0x1910 fs/jfs/namei.c:1224
 vfs_rename+0xbe1/0x1100 fs/namei.c:4882
 do_renameat2+0x8e5/0xce0 fs/namei.c:5035
 __do_sys_rename fs/namei.c:5081 [inline]
 __se_sys_rename fs/namei.c:5079 [inline]
 __x64_sys_rename+0x82/0x90 fs/namei.c:5079
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1486 [inline]
 free_pcp_prepare mm/page_alloc.c:1536 [inline]
 free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3413


Crashes (1538):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/12 03:11 linux-6.1.y 8e8fc038cad5 38c8e246 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/12 02:28 linux-6.1.y 8e8fc038cad5 38c8e246 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/12 01:44 linux-6.1.y 8e8fc038cad5 38c8e246 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/06 23:28 linux-6.1.y 1989cd3d56e2 4440e7c2 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/03 13:55 linux-6.1.y 1989cd3d56e2 4440e7c2 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2025/12/17 01:04 linux-6.1.y 50cbba13faa2 d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2025/11/13 07:43 linux-6.1.y f6e38ae624cf 07e030de .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2025/11/13 06:10 linux-6.1.y f6e38ae624cf 07e030de .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2025/09/15 11:06 linux-6.1.y 3db754f56897 e2beed91 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2025/07/23 21:33 linux-6.1.y 3369c6df2fae e1dd4f22 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2025/04/12 06:34 linux-6.1.y 420102835862 0bd6db41 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2025/01/01 11:24 linux-6.1.y 563edd786f0a d3ccff63 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2024/11/12 19:14 linux-6.1.y d7039b844a1c 75bb1b32 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2024/10/27 12:30 linux-6.1.y 7ec6f9fa3d97 65e8686b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/12 14:33 linux-6.1.y 8e8fc038cad5 38c8e246 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/25 20:19 linux-6.1.y 7c87defbd336 9c2d0995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/25 01:53 linux-6.1.y 7c87defbd336 9c2d0995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/24 21:38 linux-6.1.y 7c87defbd336 1c2b9291 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/24 14:22 linux-6.1.y 7c87defbd336 1c2b9291 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/24 13:42 linux-6.1.y 7c87defbd336 1c2b9291 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/24 01:48 linux-6.1.y 7c87defbd336 9cfb3ca7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/24 00:38 linux-6.1.y 7c87defbd336 9cfb3ca7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/23 13:13 linux-6.1.y 7c87defbd336 4c3406dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/23 11:46 linux-6.1.y 7c87defbd336 4c3406dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/23 07:25 linux-6.1.y 7c87defbd336 b10da5ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/23 00:40 linux-6.1.y 7c87defbd336 b10da5ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/22 23:39 linux-6.1.y 7c87defbd336 b10da5ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/22 23:39 linux-6.1.y 7c87defbd336 b10da5ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/22 12:30 linux-6.1.y 7c87defbd336 4595e353 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/22 11:23 linux-6.1.y 7c87defbd336 4595e353 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/22 00:40 linux-6.1.y 7c87defbd336 0b6ab7ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/21 19:05 linux-6.1.y 7c87defbd336 0b6ab7ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/21 18:00 linux-6.1.y 7c87defbd336 0b6ab7ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/21 18:00 linux-6.1.y 7c87defbd336 0b6ab7ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/21 06:32 linux-6.1.y 7c87defbd336 3f2e655b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/21 05:16 linux-6.1.y 7c87defbd336 3f2e655b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/21 02:54 linux-6.1.y 7c87defbd336 e65da4ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/20 23:17 linux-6.1.y 7c87defbd336 e65da4ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/20 22:16 linux-6.1.y 7c87defbd336 e65da4ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/20 21:16 linux-6.1.y 7c87defbd336 e65da4ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/20 17:58 linux-6.1.y 7c87defbd336 e65da4ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/19 02:37 linux-6.1.y 7c87defbd336 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/18 11:42 linux-6.1.y 7c87defbd336 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/18 08:28 linux-6.1.y 8e8fc038cad5 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/18 08:27 linux-6.1.y 8e8fc038cad5 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/18 04:19 linux-6.1.y 8e8fc038cad5 5be7a9de .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/17 23:42 linux-6.1.y 8e8fc038cad5 24ecfc1e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/17 16:14 linux-6.1.y 8e8fc038cad5 24ecfc1e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/17 09:09 linux-6.1.y 8e8fc038cad5 de0a551d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/17 01:04 linux-6.1.y 8e8fc038cad5 de0a551d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/16 13:25 linux-6.1.y 8e8fc038cad5 4743f87d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/16 13:22 linux-6.1.y 8e8fc038cad5 4743f87d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/16 04:54 linux-6.1.y 8e8fc038cad5 df15c5f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/15 13:13 linux-6.1.y 8e8fc038cad5 c441f497 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/15 09:56 linux-6.1.y 8e8fc038cad5 e2e976a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/15 00:53 linux-6.1.y 8e8fc038cad5 e2e976a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/15 00:52 linux-6.1.y 8e8fc038cad5 e2e976a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/14 12:34 linux-6.1.y 8e8fc038cad5 362d1323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/14 00:13 linux-6.1.y 8e8fc038cad5 1a086e7c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2026/04/13 12:17 linux-6.1.y 8e8fc038cad5 9530ccf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
2024/10/23 12:46 linux-6.1.y 7ec6f9fa3d97 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: Bad page state in __get_metapage
* Struck through repros no longer work on HEAD.