BUG: Bad page state in process jfsCommit pfn:203f4
page:ffffea000080fd00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1c pfn:0x203f4
flags: 0xfff0000000820d(locked|referenced|uptodate|workingset|private|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff0000000820d dead000000000100 dead000000000122 0000000000000000
raw: 000000000000001c ffff88801f8a34d8 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 0x40c40(GFP_NOFS|__GFP_COMP), pid 5065, tgid 5065 (syz-executor344), ts 78499630615, free_ts 78220594656
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537
prep_new_page mm/page_alloc.c:1544 [inline]
get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312
__alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568
alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133
folio_alloc+0x1e/0xe0 mm/mempolicy.c:2211
filemap_alloc_folio+0x3bb/0x490 mm/filemap.c:974
do_read_cache_folio+0x1b8/0x540 mm/filemap.c:3655
do_read_cache_page mm/filemap.c:3757 [inline]
read_cache_page+0x5b/0x160 mm/filemap.c:3766
read_mapping_page include/linux/pagemap.h:871 [inline]
__get_metapage+0x993/0x1170 fs/jfs/jfs_metapage.c:620
diRead+0x650/0xb00 fs/jfs/jfs_imap.c:364
jfs_iget+0x84/0x4c0 fs/jfs/inode.c:35
jfs_fill_super+0x6c8/0xd20 fs/jfs/super.c:580
mount_bdev+0x1f3/0x2e0 fs/super.c:1650
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1771
do_new_mount fs/namespace.c:3337 [inline]
path_mount+0x1492/0x1ed0 fs/namespace.c:3664
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1137 [inline]
free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487
slab_destroy mm/slab.c:1608 [inline]
slabs_destroy+0x85/0xc0 mm/slab.c:1628
cache_flusharray mm/slab.c:3341 [inline]
___cache_free+0x2b7/0x420 mm/slab.c:3404
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0x4c/0x1b0 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:763 [inline]
slab_alloc_node mm/slab.c:3237 [inline]
slab_alloc mm/slab.c:3246 [inline]
__kmem_cache_alloc_lru mm/slab.c:3423 [inline]
kmem_cache_alloc+0x159/0x360 mm/slab.c:3432
kmem_cache_zalloc include/linux/slab.h:711 [inline]
locks_alloc_lock fs/locks.c:271 [inline]
flock_lock_inode+0xb7f/0xff0 fs/locks.c:1039
flock_lock_inode_wait fs/locks.c:2018 [inline]
locks_lock_inode_wait+0x1c7/0x450 fs/locks.c:2045
locks_lock_file_wait include/linux/filelock.h:346 [inline]
__do_sys_flock+0x403/0x4c0 fs/locks.c:2115
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
Modules linked in:
CPU: 1 PID: 108 Comm: jfsCommit Not tainted 6.7.0-rc7-syzkaller-00003-gfbafc3e621c3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106
bad_page+0xb4/0x200 mm/page_alloc.c:514
free_page_is_bad_report mm/page_alloc.c:950 [inline]
free_page_is_bad mm/page_alloc.c:960 [inline]
free_pages_prepare mm/page_alloc.c:1129 [inline]
free_unref_page_prepare+0x52f/0xaa0 mm/page_alloc.c:2347
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487
__folio_put_small mm/swap.c:106 [inline]
__folio_put+0xc3/0x110 mm/swap.c:129
folio_put include/linux/mm.h:1483 [inline]
put_page include/linux/mm.h:1552 [inline]
_metapage_homeok fs/jfs/jfs_metapage.h:119 [inline]
_metapage_homeok fs/jfs/jfs_metapage.h:116 [inline]
txUnlock+0x6bb/0xd10 fs/jfs/jfs_txnmgr.c:932
txLazyCommit fs/jfs/jfs_txnmgr.c:2682 [inline]
jfs_lazycommit+0x724/0xb10 fs/jfs/jfs_txnmgr.c:2732
kthread+0x2c6/0x3a0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
page:ffffea000080fd00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1c pfn:0x203f4
flags: 0xfff0000000820d(locked|referenced|uptodate|workingset|private|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff0000000820d dead000000000100 dead000000000122 0000000000000000
raw: 000000000000001c ffff88801f8a34d8 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 0x40c40(GFP_NOFS|__GFP_COMP), pid 5065, tgid 5065 (syz-executor344), ts 78499630615, free_ts 78220594656
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537
prep_new_page mm/page_alloc.c:1544 [inline]
get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312
__alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568
alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133
folio_alloc+0x1e/0xe0 mm/mempolicy.c:2211
filemap_alloc_folio+0x3bb/0x490 mm/filemap.c:974
do_read_cache_folio+0x1b8/0x540 mm/filemap.c:3655
do_read_cache_page mm/filemap.c:3757 [inline]
read_cache_page+0x5b/0x160 mm/filemap.c:3766
read_mapping_page include/linux/pagemap.h:871 [inline]
__get_metapage+0x993/0x1170 fs/jfs/jfs_metapage.c:620
diRead+0x650/0xb00 fs/jfs/jfs_imap.c:364
jfs_iget+0x84/0x4c0 fs/jfs/inode.c:35
jfs_fill_super+0x6c8/0xd20 fs/jfs/super.c:580
mount_bdev+0x1f3/0x2e0 fs/super.c:1650
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1771
do_new_mount fs/namespace.c:3337 [inline]
path_mount+0x1492/0x1ed0 fs/namespace.c:3664
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1137 [inline]
free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487
slab_destroy mm/slab.c:1608 [inline]
slabs_destroy+0x85/0xc0 mm/slab.c:1628
cache_flusharray mm/slab.c:3341 [inline]
___cache_free+0x2b7/0x420 mm/slab.c:3404
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0x4c/0x1b0 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:763 [inline]
slab_alloc_node mm/slab.c:3237 [inline]
slab_alloc mm/slab.c:3246 [inline]
__kmem_cache_alloc_lru mm/slab.c:3423 [inline]
kmem_cache_alloc+0x159/0x360 mm/slab.c:3432
kmem_cache_zalloc include/linux/slab.h:711 [inline]
locks_alloc_lock fs/locks.c:271 [inline]
flock_lock_inode+0xb7f/0xff0 fs/locks.c:1039
flock_lock_inode_wait fs/locks.c:2018 [inline]
locks_lock_inode_wait+0x1c7/0x450 fs/locks.c:2045
locks_lock_file_wait include/linux/filelock.h:346 [inline]
__do_sys_flock+0x403/0x4c0 fs/locks.c:2115
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
------------[ cut here ]------------
kernel BUG at include/linux/mm.h:1449!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 108 Comm: jfsCommit Tainted: G B 6.7.0-rc7-syzkaller-00003-gfbafc3e621c3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:folio_get include/linux/mm.h:1449 [inline]
RIP: 0010:folio_get include/linux/mm.h:1447 [inline]
RIP: 0010:get_page include/linux/mm.h:1455 [inline]
RIP: 0010:put_metapage+0x2da/0x340 fs/jfs/jfs_metapage.c:750
Code: 8c fe 49 8d 6f ff e9 66 fe ff ff e8 70 22 e2 fe e9 d9 fd ff ff e8 46 3b 8c fe 48 c7 c6 60 da 0a 8b 48 89 ef e8 97 9c ca fe 90 <0f> 0b 4c 89 ef e8 6c 22 e2 fe e9 72 fd ff ff 4c 89 f7 e8 5f 22 e2
RSP: 0018:ffffc900025cfd10 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88801f8a34d8 RCX: ffffffff8166e765
RDX: ffff888014f04040 RSI: ffffffff82fa2949 RDI: 0000000000000000
RBP: ffffea000080fd00 R08: 0000000000000000 R09: fffffbfff1e30e22
R10: ffffffff8f187117 R11: 0000000000000000 R12: ffffea000080fd34
R13: ffff88801f8a3568 R14: ffff88801f8a3500 R15: 000000000000007f
FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8362225000 CR3: 0000000077240000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
txUnlock+0x46d/0xd10 fs/jfs/jfs_txnmgr.c:947
txLazyCommit fs/jfs/jfs_txnmgr.c:2682 [inline]
jfs_lazycommit+0x724/0xb10 fs/jfs/jfs_txnmgr.c:2732
kthread+0x2c6/0x3a0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:folio_get include/linux/mm.h:1449 [inline]
RIP: 0010:folio_get include/linux/mm.h:1447 [inline]
RIP: 0010:get_page include/linux/mm.h:1455 [inline]
RIP: 0010:put_metapage+0x2da/0x340 fs/jfs/jfs_metapage.c:750
Code: 8c fe 49 8d 6f ff e9 66 fe ff ff e8 70 22 e2 fe e9 d9 fd ff ff e8 46 3b 8c fe 48 c7 c6 60 da 0a 8b 48 89 ef e8 97 9c ca fe 90 <0f> 0b 4c 89 ef e8 6c 22 e2 fe e9 72 fd ff ff 4c 89 f7 e8 5f 22 e2
RSP: 0018:ffffc900025cfd10 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88801f8a34d8 RCX: ffffffff8166e765
RDX: ffff888014f04040 RSI: ffffffff82fa2949 RDI: 0000000000000000
RBP: ffffea000080fd00 R08: 0000000000000000 R09: fffffbfff1e30e22
R10: ffffffff8f187117 R11: 0000000000000000 R12: ffffea000080fd34
R13: ffff88801f8a3568 R14: ffff88801f8a3500 R15: 000000000000007f
FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8362225000 CR3: 0000000077240000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400