==================================================================
BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: slab-use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
BUG: KASAN: slab-use-after-free in mapping_inaccessible include/linux/pagemap.h:336 [inline]
BUG: KASAN: slab-use-after-free in move_to_new_folio+0x132/0x760 mm/migrate.c:983
Read of size 8 at addr ffff888036dd13a0 by task kcompactd0/34
CPU: 1 UID: 0 PID: 34 Comm: kcompactd0 Not tainted 6.16.0-rc4-syzkaller-00049-gb4911fb0b060 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xcd/0x680 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
check_region_inline mm/kasan/generic.c:183 [inline]
kasan_check_range+0x100/0x1b0 mm/kasan/generic.c:189
instrument_atomic_read include/linux/instrumented.h:68 [inline]
_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
mapping_inaccessible include/linux/pagemap.h:336 [inline]
move_to_new_folio+0x132/0x760 mm/migrate.c:983
migrate_folio_move mm/migrate.c:1301 [inline]
migrate_folios_move mm/migrate.c:1653 [inline]
migrate_pages_batch+0x201d/0x31a0 mm/migrate.c:1900
migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1930
migrate_pages+0x1b67/0x23b0 mm/migrate.c:2039
compact_zone+0x2023/0x4760 mm/compaction.c:2683
kcompactd_do_work+0x4a1/0xa50 mm/compaction.c:3134
kcompactd+0x406/0xeb0 mm/compaction.c:3228
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 14834:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:319 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4204
gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1183
gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135
gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1667
gfs2_lookupi+0x4b7/0x6e0 fs/gfs2/inode.c:340
gfs2_jindex_hold fs/gfs2/ops_fstype.c:574 [inline]
init_journal fs/gfs2/ops_fstype.c:716 [inline]
init_inodes+0x869/0x2eb0 fs/gfs2/ops_fstype.c:851
gfs2_fill_super+0x1c03/0x2d60 fs/gfs2/ops_fstype.c:1253
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
do_mount fs/namespace.c:4239 [inline]
__do_sys_mount fs/namespace.c:4450 [inline]
__se_sys_mount fs/namespace.c:4427 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4427
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
Freed by task 14834:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4643 [inline]
kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4745
gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135
rcu_do_batch kernel/rcu/tree.c:2576 [inline]
rcu_core+0x79c/0x14e0 kernel/rcu/tree.c:2832
handle_softirqs+0x219/0x8e0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548
__call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3094
gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178
glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1108
process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3321 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Second to last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548
insert_work+0x36/0x230 kernel/workqueue.c:2183
__queue_work+0x97e/0x10f0 kernel/workqueue.c:2341
__queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2509
queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2561
queue_delayed_work include/linux/workqueue.h:677 [inline]
gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250
clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2154
glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2084
gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2210
gfs2_fill_super+0x2544/0x2d60 fs/gfs2/ops_fstype.c:1306
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
do_mount fs/namespace.c:4239 [inline]
__do_sys_mount fs/namespace.c:4450 [inline]
__se_sys_mount fs/namespace.c:4427 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4427
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
The buggy address belongs to the object at ffff888036dd0fd8
which belongs to the cache gfs2_glock(aspace) of size 1224
The buggy address is located 968 bytes inside of
freed 1224-byte region [ffff888036dd0fd8, ffff888036dd14a0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888036dd1fb0 pfn:0x36dd0
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff888146ef7c80 dead000000000122 0000000000000000
raw: ffff888036dd1fb0 00000000800c0002 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff888146ef7c80 dead000000000122 0000000000000000
head: ffff888036dd1fb0 00000000800c0002 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000db7401 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 14834, tgid 14833 (syz.1.2314), ts 1231088758807, free_ts 1230998954677
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_slab_page mm/slub.c:2451 [inline]
allocate_slab mm/slub.c:2619 [inline]
new_slab+0x23b/0x330 mm/slub.c:2673
___slab_alloc+0xd9c/0x1940 mm/slub.c:3859
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949
__slab_alloc_node mm/slub.c:4024 [inline]
slab_alloc_node mm/slub.c:4185 [inline]
kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4204
gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1183
gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135
gfs2_lookup_root+0x57/0x130 fs/gfs2/ops_fstype.c:425
init_sb+0xae5/0x10d0 fs/gfs2/ops_fstype.c:494
gfs2_fill_super+0x1988/0x2d60 fs/gfs2/ops_fstype.c:1220
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
page last free pid 14834 tgid 14833 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
stack_depot_save_flags+0x354/0xa40 lib/stackdepot.c:678
kasan_save_stack+0x42/0x60 mm/kasan/common.c:48
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:319 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4204
__kernfs_new_node+0xd2/0x8e0 fs/kernfs/dir.c:637
kernfs_new_node+0x13c/0x1e0 fs/kernfs/dir.c:713
kernfs_create_dir_ns+0x4c/0x1a0 fs/kernfs/dir.c:1083
internal_create_group+0x34d/0xf30 fs/sysfs/group.c:170
gfs2_sys_fs_add+0x2b7/0x440 fs/gfs2/sys.c:742
gfs2_fill_super+0x1412/0x2d60 fs/gfs2/ops_fstype.c:1206
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
Memory state around the buggy address:
ffff888036dd1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888036dd1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888036dd1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888036dd1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888036dd1480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in constant_test_bit arch/x86/include/asm/bitops.h:206 [inline]
BUG: KASAN: slab-use-after-free in arch_test_bit arch/x86/include/asm/bitops.h:238 [inline]
BUG: KASAN: slab-use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
BUG: KASAN: slab-use-after-free in mapping_inaccessible include/linux/pagemap.h:336 [inline]
BUG: KASAN: slab-use-after-free in move_to_new_folio+0x6d0/0x760 mm/migrate.c:983
Read of size 8 at addr ffff888036dd13a0 by task kcompactd0/34
CPU: 1 UID: 0 PID: 34 Comm: kcompactd0 Tainted: G B 6.16.0-rc4-syzkaller-00049-gb4911fb0b060 #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xcd/0x680 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
constant_test_bit arch/x86/include/asm/bitops.h:206 [inline]
arch_test_bit arch/x86/include/asm/bitops.h:238 [inline]
_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
mapping_inaccessible include/linux/pagemap.h:336 [inline]
move_to_new_folio+0x6d0/0x760 mm/migrate.c:983
migrate_folio_move mm/migrate.c:1301 [inline]
migrate_folios_move mm/migrate.c:1653 [inline]
migrate_pages_batch+0x201d/0x31a0 mm/migrate.c:1900
migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1930
migrate_pages+0x1b67/0x23b0 mm/migrate.c:2039
compact_zone+0x2023/0x4760 mm/compaction.c:2683
kcompactd_do_work+0x4a1/0xa50 mm/compaction.c:3134
kcompactd+0x406/0xeb0 mm/compaction.c:3228
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 14834:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:319 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4204
gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1183
gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135
gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1667
gfs2_lookupi+0x4b7/0x6e0 fs/gfs2/inode.c:340
gfs2_jindex_hold fs/gfs2/ops_fstype.c:574 [inline]
init_journal fs/gfs2/ops_fstype.c:716 [inline]
init_inodes+0x869/0x2eb0 fs/gfs2/ops_fstype.c:851
gfs2_fill_super+0x1c03/0x2d60 fs/gfs2/ops_fstype.c:1253
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
do_mount fs/namespace.c:4239 [inline]
__do_sys_mount fs/namespace.c:4450 [inline]
__se_sys_mount fs/namespace.c:4427 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4427
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
Freed by task 14834:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4643 [inline]
kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4745
gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135
rcu_do_batch kernel/rcu/tree.c:2576 [inline]
rcu_core+0x79c/0x14e0 kernel/rcu/tree.c:2832
handle_softirqs+0x219/0x8e0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548
__call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3094
gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178
glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1108
process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3321 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Second to last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548
insert_work+0x36/0x230 kernel/workqueue.c:2183
__queue_work+0x97e/0x10f0 kernel/workqueue.c:2341
__queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2509
queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2561
queue_delayed_work include/linux/workqueue.h:677 [inline]
gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250
clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2154
glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2084
gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2210
gfs2_fill_super+0x2544/0x2d60 fs/gfs2/ops_fstype.c:1306
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
do_mount fs/namespace.c:4239 [inline]
__do_sys_mount fs/namespace.c:4450 [inline]
__se_sys_mount fs/namespace.c:4427 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4427
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
The buggy address belongs to the object at ffff888036dd0fd8
which belongs to the cache gfs2_glock(aspace) of size 1224
The buggy address is located 968 bytes inside of
freed 1224-byte region [ffff888036dd0fd8, ffff888036dd14a0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888036dd1fb0 pfn:0x36dd0
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff888146ef7c80 dead000000000122 0000000000000000
raw: ffff888036dd1fb0 00000000800c0002 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff888146ef7c80 dead000000000122 0000000000000000
head: ffff888036dd1fb0 00000000800c0002 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000db7401 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 14834, tgid 14833 (syz.1.2314), ts 1231088758807, free_ts 1230998954677
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_slab_page mm/slub.c:2451 [inline]
allocate_slab mm/slub.c:2619 [inline]
new_slab+0x23b/0x330 mm/slub.c:2673
___slab_alloc+0xd9c/0x1940 mm/slub.c:3859
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949
__slab_alloc_node mm/slub.c:4024 [inline]
slab_alloc_node mm/slub.c:4185 [inline]
kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4204
gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1183
gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135
gfs2_lookup_root+0x57/0x130 fs/gfs2/ops_fstype.c:425
init_sb+0xae5/0x10d0 fs/gfs2/ops_fstype.c:494
gfs2_fill_super+0x1988/0x2d60 fs/gfs2/ops_fstype.c:1220
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
page last free pid 14834 tgid 14833 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
stack_depot_save_flags+0x354/0xa40 lib/stackdepot.c:678
kasan_save_stack+0x42/0x60 mm/kasan/common.c:48
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:319 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4204
__kernfs_new_node+0xd2/0x8e0 fs/kernfs/dir.c:637
kernfs_new_node+0x13c/0x1e0 fs/kernfs/dir.c:713
kernfs_create_dir_ns+0x4c/0x1a0 fs/kernfs/dir.c:1083
internal_create_group+0x34d/0xf30 fs/sysfs/group.c:170
gfs2_sys_fs_add+0x2b7/0x440 fs/gfs2/sys.c:742
gfs2_fill_super+0x1412/0x2d60 fs/gfs2/ops_fstype.c:1206
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
Memory state around the buggy address:
ffff888036dd1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888036dd1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888036dd1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888036dd1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888036dd1480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in move_to_new_folio+0x5e9/0x760 mm/migrate.c:985
Read of size 8 at addr ffff888036dd1398 by task kcompactd0/34
CPU: 1 UID: 0 PID: 34 Comm: kcompactd0 Tainted: G B 6.16.0-rc4-syzkaller-00049-gb4911fb0b060 #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xcd/0x680 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
move_to_new_folio+0x5e9/0x760 mm/migrate.c:985
migrate_folio_move mm/migrate.c:1301 [inline]
migrate_folios_move mm/migrate.c:1653 [inline]
migrate_pages_batch+0x201d/0x31a0 mm/migrate.c:1900
migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1930
migrate_pages+0x1b67/0x23b0 mm/migrate.c:2039
compact_zone+0x2023/0x4760 mm/compaction.c:2683
kcompactd_do_work+0x4a1/0xa50 mm/compaction.c:3134
kcompactd+0x406/0xeb0 mm/compaction.c:3228
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 14834:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:319 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4204
gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1183
gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135
gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1667
gfs2_lookupi+0x4b7/0x6e0 fs/gfs2/inode.c:340
gfs2_jindex_hold fs/gfs2/ops_fstype.c:574 [inline]
init_journal fs/gfs2/ops_fstype.c:716 [inline]
init_inodes+0x869/0x2eb0 fs/gfs2/ops_fstype.c:851
gfs2_fill_super+0x1c03/0x2d60 fs/gfs2/ops_fstype.c:1253
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
do_mount fs/namespace.c:4239 [inline]
__do_sys_mount fs/namespace.c:4450 [inline]
__se_sys_mount fs/namespace.c:4427 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4427
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
Freed by task 14834:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4643 [inline]
kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4745
gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135
rcu_do_batch kernel/rcu/tree.c:2576 [inline]
rcu_core+0x79c/0x14e0 kernel/rcu/tree.c:2832
handle_softirqs+0x219/0x8e0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548
__call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3094
gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178
glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1108
process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3321 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Second to last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548
insert_work+0x36/0x230 kernel/workqueue.c:2183
__queue_work+0x97e/0x10f0 kernel/workqueue.c:2341
__queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2509
queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2561
queue_delayed_work include/linux/workqueue.h:677 [inline]
gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250
clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2154
glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2084
gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2210
gfs2_fill_super+0x2544/0x2d60 fs/gfs2/ops_fstype.c:1306
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
do_mount fs/namespace.c:4239 [inline]
__do_sys_mount fs/namespace.c:4450 [inline]
__se_sys_mount fs/namespace.c:4427 [inline]
__x64_sys_mount+0x28d/0x310 fs/namespace.c:4427
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
The buggy address belongs to the object at ffff888036dd0fd8
which belongs to the cache gfs2_glock(aspace) of size 1224
The buggy address is located 960 bytes inside of
freed 1224-byte region [ffff888036dd0fd8, ffff888036dd14a0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888036dd1fb0 pfn:0x36dd0
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff888146ef7c80 dead000000000122 0000000000000000
raw: ffff888036dd1fb0 00000000800c0002 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff888146ef7c80 dead000000000122 0000000000000000
head: ffff888036dd1fb0 00000000800c0002 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000db7401 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 14834, tgid 14833 (syz.1.2314), ts 1231088758807, free_ts 1230998954677
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_slab_page mm/slub.c:2451 [inline]
allocate_slab mm/slub.c:2619 [inline]
new_slab+0x23b/0x330 mm/slub.c:2673
___slab_alloc+0xd9c/0x1940 mm/slub.c:3859
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949
__slab_alloc_node mm/slub.c:4024 [inline]
slab_alloc_node mm/slub.c:4185 [inline]
kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4204
gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1183
gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135
gfs2_lookup_root+0x57/0x130 fs/gfs2/ops_fstype.c:425
init_sb+0xae5/0x10d0 fs/gfs2/ops_fstype.c:494
gfs2_fill_super+0x1988/0x2d60 fs/gfs2/ops_fstype.c:1220
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
page last free pid 14834 tgid 14833 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
stack_depot_save_flags+0x354/0xa40 lib/stackdepot.c:678
kasan_save_stack+0x42/0x60 mm/kasan/common.c:48
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:319 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4204
__kernfs_new_node+0xd2/0x8e0 fs/kernfs/dir.c:637
kernfs_new_node+0x13c/0x1e0 fs/kernfs/dir.c:713
kernfs_create_dir_ns+0x4c/0x1a0 fs/kernfs/dir.c:1083
internal_create_group+0x34d/0xf30 fs/sysfs/group.c:170
gfs2_sys_fs_add+0x2b7/0x440 fs/gfs2/sys.c:742
gfs2_fill_super+0x1412/0x2d60 fs/gfs2/ops_fstype.c:1206
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1681
gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335
vfs_get_tree+0x8e/0x340 fs/super.c:1804
do_new_mount fs/namespace.c:3902 [inline]
path_mount+0x1414/0x2020 fs/namespace.c:4226
Memory state around the buggy address:
ffff888036dd1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888036dd1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888036dd1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888036dd1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888036dd1480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
------------[ cut here ]------------
gfs2_meta_aops does not implement migrate_folio
WARNING: CPU: 1 PID: 34 at mm/migrate.c:942 fallback_migrate_folio mm/migrate.c:942 [inline]
WARNING: CPU: 1 PID: 34 at mm/migrate.c:942 move_to_new_folio+0x662/0x760 mm/migrate.c:996
Modules linked in:
CPU: 1 UID: 0 PID: 34 Comm: kcompactd0 Tainted: G B 6.16.0-rc4-syzkaller-00049-gb4911fb0b060 #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:fallback_migrate_folio mm/migrate.c:942 [inline]
RIP: 0010:move_to_new_folio+0x662/0x760 mm/migrate.c:996
Code: ff 0f b6 04 24 84 c0 0f 85 97 fc ff ff e8 e6 0b 99 ff c6 05 6b 6f 6d 0e 01 90 48 c7 c7 00 70 bd 8b 4c 89 ee e8 bf cc 57 ff 90 <0f> 0b 90 90 e9 71 fc ff ff e8 c0 0b 99 ff 48 c7 c6 60 70 bd 8b 48
RSP: 0018:ffffc90000aa7460 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffffea00018694c0 RCX: ffffffff817ae278
RDX: ffff88801f695a00 RSI: ffffffff817ae285 RDI: 0000000000000001
RBP: ffff888036dd1278 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 74656d5f32736667 R12: ffffea0002c489c0
R13: ffffffff8bfea0e0 R14: 0000000000000000 R15: ffffea00018694d8
FS: 0000000000000000(0000) GS:ffff888124859000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055556f837808 CR3: 000000007e7d0000 CR4: 0000000000350ef0
Call Trace:
migrate_folio_move mm/migrate.c:1301 [inline]
migrate_folios_move mm/migrate.c:1653 [inline]
migrate_pages_batch+0x201d/0x31a0 mm/migrate.c:1900
migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1930
migrate_pages+0x1b67/0x23b0 mm/migrate.c:2039
compact_zone+0x2023/0x4760 mm/compaction.c:2683
kcompactd_do_work+0x4a1/0xa50 mm/compaction.c:3134
kcompactd+0x406/0xeb0 mm/compaction.c:3228
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245