================================================================== 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+0xef/0x400 mm/migrate.c:1065 Read of size 8 at addr ffff8880788d13a0 by task syz.6.11608/1392 CPU: 0 UID: 0 PID: 1392 Comm: syz.6.11608 Not tainted 6.16.0-syzkaller-10355-gf2d282e1dfb3 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 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+0xef/0x400 mm/migrate.c:1065 migrate_folio_move mm/migrate.c:1348 [inline] migrate_folios_move mm/migrate.c:1697 [inline] migrate_pages_batch+0x1fab/0x3bd0 mm/migrate.c:1944 migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1974 migrate_pages+0x1b67/0x23b0 mm/migrate.c:2083 compact_zone+0x2018/0x4760 mm/compaction.c:2647 compact_node+0x1a4/0x2d0 mm/compaction.c:2916 compact_nodes mm/compaction.c:2938 [inline] sysctl_compaction_handler mm/compaction.c:2989 [inline] sysctl_compaction_handler+0x141/0x210 mm/compaction.c:2976 proc_sys_call_handler+0x440/0x570 fs/proc/proc_sysctl.c:600 iter_file_splice_write+0x91f/0x1150 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x192/0x6c0 fs/splice.c:1158 splice_direct_to_actor+0x345/0xa30 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1227 do_sendfile+0xb06/0xe50 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1425 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __x64_sys_sendfile64+0x154/0x220 fs/read_write.c:1417 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 RIP: 0033:0x7f36c158eb69 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:00007f36c23e5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f36c17b5fa0 RCX: 00007f36c158eb69 RDX: 00002000000000c0 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f36c1611df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f36c17b5fa0 R15: 00007ffd6c00e3d8 Allocated by task 31875: 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:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135 gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1665 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+0x1be2/0x2d30 fs/gfs2/ops_fstype.c:1253 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 23: 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:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4782 gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160 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 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:3123 gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178 glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1107 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 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:2184 __queue_work+0x97e/0x1160 kernel/workqueue.c:2339 __queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2507 queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2559 queue_delayed_work include/linux/workqueue.h:684 [inline] gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250 clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2153 glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2083 gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2209 gfs2_fill_super+0x2524/0x2d30 fs/gfs2/ops_fstype.c:1306 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 ffff8880788d0fd8 which belongs to the cache gfs2_glock(aspace) of size 1224 The buggy address is located 968 bytes inside of freed 1224-byte region [ffff8880788d0fd8, ffff8880788d14a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880788d0548 pfn:0x788d0 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 ffff888146ef3b40 dead000000000122 0000000000000000 raw: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888146ef3b40 dead000000000122 0000000000000000 head: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001e23401 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 31875, tgid 31874 (syz.6.10882), ts 1229886871877, free_ts 1229839928771 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xd1e/0x1780 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 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+0x1967/0x2d30 fs/gfs2/ops_fstype.c:1220 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 page last free pid 5206 tgid 5206 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 locks_alloc_lock fs/locks.c:275 [inline] flock_lock_inode+0xbe8/0x1030 fs/locks.c:1091 flock_lock_inode_wait fs/locks.c:2084 [inline] locks_lock_inode_wait+0x1da/0x490 fs/locks.c:2111 locks_lock_file_wait include/linux/filelock.h:427 [inline] __do_sys_flock+0x446/0x520 fs/locks.c:2179 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 Memory state around the buggy address: ffff8880788d1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880788d1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880788d1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1480: 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+0x3bf/0x400 mm/migrate.c:1065 Read of size 8 at addr ffff8880788d13a0 by task syz.6.11608/1392 CPU: 0 UID: 0 PID: 1392 Comm: syz.6.11608 Tainted: G B 6.16.0-syzkaller-10355-gf2d282e1dfb3 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 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+0x3bf/0x400 mm/migrate.c:1065 migrate_folio_move mm/migrate.c:1348 [inline] migrate_folios_move mm/migrate.c:1697 [inline] migrate_pages_batch+0x1fab/0x3bd0 mm/migrate.c:1944 migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1974 migrate_pages+0x1b67/0x23b0 mm/migrate.c:2083 compact_zone+0x2018/0x4760 mm/compaction.c:2647 compact_node+0x1a4/0x2d0 mm/compaction.c:2916 compact_nodes mm/compaction.c:2938 [inline] sysctl_compaction_handler mm/compaction.c:2989 [inline] sysctl_compaction_handler+0x141/0x210 mm/compaction.c:2976 proc_sys_call_handler+0x440/0x570 fs/proc/proc_sysctl.c:600 iter_file_splice_write+0x91f/0x1150 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x192/0x6c0 fs/splice.c:1158 splice_direct_to_actor+0x345/0xa30 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1227 do_sendfile+0xb06/0xe50 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1425 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __x64_sys_sendfile64+0x154/0x220 fs/read_write.c:1417 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 RIP: 0033:0x7f36c158eb69 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:00007f36c23e5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f36c17b5fa0 RCX: 00007f36c158eb69 RDX: 00002000000000c0 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f36c1611df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f36c17b5fa0 R15: 00007ffd6c00e3d8 Allocated by task 31875: 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:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135 gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1665 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+0x1be2/0x2d30 fs/gfs2/ops_fstype.c:1253 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 23: 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:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4782 gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160 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 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:3123 gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178 glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1107 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 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:2184 __queue_work+0x97e/0x1160 kernel/workqueue.c:2339 __queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2507 queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2559 queue_delayed_work include/linux/workqueue.h:684 [inline] gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250 clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2153 glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2083 gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2209 gfs2_fill_super+0x2524/0x2d30 fs/gfs2/ops_fstype.c:1306 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 ffff8880788d0fd8 which belongs to the cache gfs2_glock(aspace) of size 1224 The buggy address is located 968 bytes inside of freed 1224-byte region [ffff8880788d0fd8, ffff8880788d14a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880788d0548 pfn:0x788d0 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 ffff888146ef3b40 dead000000000122 0000000000000000 raw: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888146ef3b40 dead000000000122 0000000000000000 head: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001e23401 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 31875, tgid 31874 (syz.6.10882), ts 1229886871877, free_ts 1229839928771 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xd1e/0x1780 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 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+0x1967/0x2d30 fs/gfs2/ops_fstype.c:1220 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 page last free pid 5206 tgid 5206 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 locks_alloc_lock fs/locks.c:275 [inline] flock_lock_inode+0xbe8/0x1030 fs/locks.c:1091 flock_lock_inode_wait fs/locks.c:2084 [inline] locks_lock_inode_wait+0x1da/0x490 fs/locks.c:2111 locks_lock_file_wait include/linux/filelock.h:427 [inline] __do_sys_flock+0x446/0x520 fs/locks.c:2179 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 Memory state around the buggy address: ffff8880788d1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880788d1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880788d1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1480: 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+0x3d3/0x400 mm/migrate.c:1067 Read of size 8 at addr ffff8880788d1398 by task syz.6.11608/1392 CPU: 1 UID: 0 PID: 1392 Comm: syz.6.11608 Tainted: G B 6.16.0-syzkaller-10355-gf2d282e1dfb3 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 move_to_new_folio+0x3d3/0x400 mm/migrate.c:1067 migrate_folio_move mm/migrate.c:1348 [inline] migrate_folios_move mm/migrate.c:1697 [inline] migrate_pages_batch+0x1fab/0x3bd0 mm/migrate.c:1944 migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1974 migrate_pages+0x1b67/0x23b0 mm/migrate.c:2083 compact_zone+0x2018/0x4760 mm/compaction.c:2647 compact_node+0x1a4/0x2d0 mm/compaction.c:2916 compact_nodes mm/compaction.c:2938 [inline] sysctl_compaction_handler mm/compaction.c:2989 [inline] sysctl_compaction_handler+0x141/0x210 mm/compaction.c:2976 proc_sys_call_handler+0x440/0x570 fs/proc/proc_sysctl.c:600 iter_file_splice_write+0x91f/0x1150 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x192/0x6c0 fs/splice.c:1158 splice_direct_to_actor+0x345/0xa30 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1227 do_sendfile+0xb06/0xe50 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1425 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __x64_sys_sendfile64+0x154/0x220 fs/read_write.c:1417 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 RIP: 0033:0x7f36c158eb69 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:00007f36c23e5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f36c17b5fa0 RCX: 00007f36c158eb69 RDX: 00002000000000c0 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f36c1611df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f36c17b5fa0 R15: 00007ffd6c00e3d8 Allocated by task 31875: 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:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135 gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1665 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+0x1be2/0x2d30 fs/gfs2/ops_fstype.c:1253 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 23: 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:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4782 gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160 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 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:3123 gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178 glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1107 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 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:2184 __queue_work+0x97e/0x1160 kernel/workqueue.c:2339 __queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2507 queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2559 queue_delayed_work include/linux/workqueue.h:684 [inline] gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250 clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2153 glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2083 gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2209 gfs2_fill_super+0x2524/0x2d30 fs/gfs2/ops_fstype.c:1306 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 ffff8880788d0fd8 which belongs to the cache gfs2_glock(aspace) of size 1224 The buggy address is located 960 bytes inside of freed 1224-byte region [ffff8880788d0fd8, ffff8880788d14a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880788d0548 pfn:0x788d0 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 ffff888146ef3b40 dead000000000122 0000000000000000 raw: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888146ef3b40 dead000000000122 0000000000000000 head: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001e23401 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 31875, tgid 31874 (syz.6.10882), ts 1229886871877, free_ts 1229839928771 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xd1e/0x1780 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 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+0x1967/0x2d30 fs/gfs2/ops_fstype.c:1220 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 page last free pid 5206 tgid 5206 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 locks_alloc_lock fs/locks.c:275 [inline] flock_lock_inode+0xbe8/0x1030 fs/locks.c:1091 flock_lock_inode_wait fs/locks.c:2084 [inline] locks_lock_inode_wait+0x1da/0x490 fs/locks.c:2111 locks_lock_file_wait include/linux/filelock.h:427 [inline] __do_sys_flock+0x446/0x520 fs/locks.c:2179 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 Memory state around the buggy address: ffff8880788d1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880788d1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880788d1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff8880788d13b4 by task syz.6.11608/1392 CPU: 0 UID: 0 PID: 1392 Comm: syz.6.11608 Tainted: G B 6.16.0-syzkaller-10355-gf2d282e1dfb3 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:115 spin_lock include/linux/spinlock.h:351 [inline] __buffer_migrate_folio+0x40b/0x6d0 mm/migrate.c:926 move_to_new_folio+0x19f/0x400 mm/migrate.c:1075 migrate_folio_move mm/migrate.c:1348 [inline] migrate_folios_move mm/migrate.c:1697 [inline] migrate_pages_batch+0x1fab/0x3bd0 mm/migrate.c:1944 migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1974 migrate_pages+0x1b67/0x23b0 mm/migrate.c:2083 compact_zone+0x2018/0x4760 mm/compaction.c:2647 compact_node+0x1a4/0x2d0 mm/compaction.c:2916 compact_nodes mm/compaction.c:2938 [inline] sysctl_compaction_handler mm/compaction.c:2989 [inline] sysctl_compaction_handler+0x141/0x210 mm/compaction.c:2976 proc_sys_call_handler+0x440/0x570 fs/proc/proc_sysctl.c:600 iter_file_splice_write+0x91f/0x1150 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x192/0x6c0 fs/splice.c:1158 splice_direct_to_actor+0x345/0xa30 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1227 do_sendfile+0xb06/0xe50 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1425 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __x64_sys_sendfile64+0x154/0x220 fs/read_write.c:1417 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 RIP: 0033:0x7f36c158eb69 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:00007f36c23e5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f36c17b5fa0 RCX: 00007f36c158eb69 RDX: 00002000000000c0 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f36c1611df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f36c17b5fa0 R15: 00007ffd6c00e3d8 Allocated by task 31875: 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:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135 gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1665 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+0x1be2/0x2d30 fs/gfs2/ops_fstype.c:1253 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 23: 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:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4782 gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160 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 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:3123 gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178 glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1107 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 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:2184 __queue_work+0x97e/0x1160 kernel/workqueue.c:2339 __queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2507 queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2559 queue_delayed_work include/linux/workqueue.h:684 [inline] gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250 clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2153 glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2083 gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2209 gfs2_fill_super+0x2524/0x2d30 fs/gfs2/ops_fstype.c:1306 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 ffff8880788d0fd8 which belongs to the cache gfs2_glock(aspace) of size 1224 The buggy address is located 988 bytes inside of freed 1224-byte region [ffff8880788d0fd8, ffff8880788d14a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880788d0548 pfn:0x788d0 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 ffff888146ef3b40 dead000000000122 0000000000000000 raw: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888146ef3b40 dead000000000122 0000000000000000 head: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001e23401 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 31875, tgid 31874 (syz.6.10882), ts 1229886871877, free_ts 1229839928771 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xd1e/0x1780 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 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+0x1967/0x2d30 fs/gfs2/ops_fstype.c:1220 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 page last free pid 5206 tgid 5206 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 locks_alloc_lock fs/locks.c:275 [inline] flock_lock_inode+0xbe8/0x1030 fs/locks.c:1091 flock_lock_inode_wait fs/locks.c:2084 [inline] locks_lock_inode_wait+0x1da/0x490 fs/locks.c:2111 locks_lock_file_wait include/linux/filelock.h:427 [inline] __do_sys_flock+0x446/0x520 fs/locks.c:2179 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 Memory state around the buggy address: ffff8880788d1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880788d1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880788d1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:87 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x27f/0x2b0 kernel/locking/spinlock_debug.c:115 Read of size 8 at addr ffff8880788d13c0 by task syz.6.11608/1392 CPU: 0 UID: 0 PID: 1392 Comm: syz.6.11608 Tainted: G B 6.16.0-syzkaller-10355-gf2d282e1dfb3 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 debug_spin_lock_before kernel/locking/spinlock_debug.c:87 [inline] do_raw_spin_lock+0x27f/0x2b0 kernel/locking/spinlock_debug.c:115 spin_lock include/linux/spinlock.h:351 [inline] __buffer_migrate_folio+0x40b/0x6d0 mm/migrate.c:926 move_to_new_folio+0x19f/0x400 mm/migrate.c:1075 migrate_folio_move mm/migrate.c:1348 [inline] migrate_folios_move mm/migrate.c:1697 [inline] migrate_pages_batch+0x1fab/0x3bd0 mm/migrate.c:1944 migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1974 migrate_pages+0x1b67/0x23b0 mm/migrate.c:2083 compact_zone+0x2018/0x4760 mm/compaction.c:2647 compact_node+0x1a4/0x2d0 mm/compaction.c:2916 compact_nodes mm/compaction.c:2938 [inline] sysctl_compaction_handler mm/compaction.c:2989 [inline] sysctl_compaction_handler+0x141/0x210 mm/compaction.c:2976 proc_sys_call_handler+0x440/0x570 fs/proc/proc_sysctl.c:600 iter_file_splice_write+0x91f/0x1150 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x192/0x6c0 fs/splice.c:1158 splice_direct_to_actor+0x345/0xa30 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1227 do_sendfile+0xb06/0xe50 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1425 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __x64_sys_sendfile64+0x154/0x220 fs/read_write.c:1417 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 RIP: 0033:0x7f36c158eb69 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:00007f36c23e5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f36c17b5fa0 RCX: 00007f36c158eb69 RDX: 00002000000000c0 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f36c1611df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f36c17b5fa0 R15: 00007ffd6c00e3d8 Allocated by task 31875: 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:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135 gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1665 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+0x1be2/0x2d30 fs/gfs2/ops_fstype.c:1253 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 23: 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:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4782 gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160 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 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:3123 gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178 glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1107 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 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:2184 __queue_work+0x97e/0x1160 kernel/workqueue.c:2339 __queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2507 queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2559 queue_delayed_work include/linux/workqueue.h:684 [inline] gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250 clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2153 glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2083 gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2209 gfs2_fill_super+0x2524/0x2d30 fs/gfs2/ops_fstype.c:1306 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 ffff8880788d0fd8 which belongs to the cache gfs2_glock(aspace) of size 1224 The buggy address is located 1000 bytes inside of freed 1224-byte region [ffff8880788d0fd8, ffff8880788d14a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880788d0548 pfn:0x788d0 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 ffff888146ef3b40 dead000000000122 0000000000000000 raw: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888146ef3b40 dead000000000122 0000000000000000 head: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001e23401 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 31875, tgid 31874 (syz.6.10882), ts 1229886871877, free_ts 1229839928771 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xd1e/0x1780 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 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+0x1967/0x2d30 fs/gfs2/ops_fstype.c:1220 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 page last free pid 5206 tgid 5206 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 locks_alloc_lock fs/locks.c:275 [inline] flock_lock_inode+0xbe8/0x1030 fs/locks.c:1091 flock_lock_inode_wait fs/locks.c:2084 [inline] locks_lock_inode_wait+0x1da/0x490 fs/locks.c:2111 locks_lock_file_wait include/linux/filelock.h:427 [inline] __do_sys_flock+0x446/0x520 fs/locks.c:2179 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 Memory state around the buggy address: ffff8880788d1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880788d1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880788d1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:88 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x265/0x2b0 kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff8880788d13b8 by task syz.6.11608/1392 CPU: 0 UID: 0 PID: 1392 Comm: syz.6.11608 Tainted: G B 6.16.0-syzkaller-10355-gf2d282e1dfb3 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 debug_spin_lock_before kernel/locking/spinlock_debug.c:88 [inline] do_raw_spin_lock+0x265/0x2b0 kernel/locking/spinlock_debug.c:115 spin_lock include/linux/spinlock.h:351 [inline] __buffer_migrate_folio+0x40b/0x6d0 mm/migrate.c:926 move_to_new_folio+0x19f/0x400 mm/migrate.c:1075 migrate_folio_move mm/migrate.c:1348 [inline] migrate_folios_move mm/migrate.c:1697 [inline] migrate_pages_batch+0x1fab/0x3bd0 mm/migrate.c:1944 migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1974 migrate_pages+0x1b67/0x23b0 mm/migrate.c:2083 compact_zone+0x2018/0x4760 mm/compaction.c:2647 compact_node+0x1a4/0x2d0 mm/compaction.c:2916 compact_nodes mm/compaction.c:2938 [inline] sysctl_compaction_handler mm/compaction.c:2989 [inline] sysctl_compaction_handler+0x141/0x210 mm/compaction.c:2976 proc_sys_call_handler+0x440/0x570 fs/proc/proc_sysctl.c:600 iter_file_splice_write+0x91f/0x1150 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x192/0x6c0 fs/splice.c:1158 splice_direct_to_actor+0x345/0xa30 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1227 do_sendfile+0xb06/0xe50 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1425 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __x64_sys_sendfile64+0x154/0x220 fs/read_write.c:1417 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 RIP: 0033:0x7f36c158eb69 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:00007f36c23e5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f36c17b5fa0 RCX: 00007f36c158eb69 RDX: 00002000000000c0 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f36c1611df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f36c17b5fa0 R15: 00007ffd6c00e3d8 Allocated by task 31875: 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:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135 gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1665 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+0x1be2/0x2d30 fs/gfs2/ops_fstype.c:1253 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 23: 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:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4782 gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160 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 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:3123 gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178 glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1107 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 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:2184 __queue_work+0x97e/0x1160 kernel/workqueue.c:2339 __queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2507 queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2559 queue_delayed_work include/linux/workqueue.h:684 [inline] gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250 clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2153 glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2083 gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2209 gfs2_fill_super+0x2524/0x2d30 fs/gfs2/ops_fstype.c:1306 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 ffff8880788d0fd8 which belongs to the cache gfs2_glock(aspace) of size 1224 The buggy address is located 992 bytes inside of freed 1224-byte region [ffff8880788d0fd8, ffff8880788d14a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880788d0548 pfn:0x788d0 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 ffff888146ef3b40 dead000000000122 0000000000000000 raw: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888146ef3b40 dead000000000122 0000000000000000 head: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001e23401 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 31875, tgid 31874 (syz.6.10882), ts 1229886871877, free_ts 1229839928771 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xd1e/0x1780 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 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+0x1967/0x2d30 fs/gfs2/ops_fstype.c:1220 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 page last free pid 5206 tgid 5206 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 locks_alloc_lock fs/locks.c:275 [inline] flock_lock_inode+0xbe8/0x1030 fs/locks.c:1091 flock_lock_inode_wait fs/locks.c:2084 [inline] locks_lock_inode_wait+0x1da/0x490 fs/locks.c:2111 locks_lock_file_wait include/linux/filelock.h:427 [inline] __do_sys_flock+0x446/0x520 fs/locks.c:2179 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 Memory state around the buggy address: ffff8880788d1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880788d1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880788d1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1300 [inline] BUG: KASAN: slab-use-after-free in queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x11d/0x2b0 kernel/locking/spinlock_debug.c:116 Write of size 4 at addr ffff8880788d13b0 by task syz.6.11608/1392 CPU: 0 UID: 0 PID: 1392 Comm: syz.6.11608 Tainted: G B 6.16.0-syzkaller-10355-gf2d282e1dfb3 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x100/0x1b0 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1300 [inline] queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] do_raw_spin_lock+0x11d/0x2b0 kernel/locking/spinlock_debug.c:116 spin_lock include/linux/spinlock.h:351 [inline] __buffer_migrate_folio+0x40b/0x6d0 mm/migrate.c:926 move_to_new_folio+0x19f/0x400 mm/migrate.c:1075 migrate_folio_move mm/migrate.c:1348 [inline] migrate_folios_move mm/migrate.c:1697 [inline] migrate_pages_batch+0x1fab/0x3bd0 mm/migrate.c:1944 migrate_pages_sync+0x12d/0x8a0 mm/migrate.c:1974 migrate_pages+0x1b67/0x23b0 mm/migrate.c:2083 compact_zone+0x2018/0x4760 mm/compaction.c:2647 compact_node+0x1a4/0x2d0 mm/compaction.c:2916 compact_nodes mm/compaction.c:2938 [inline] sysctl_compaction_handler mm/compaction.c:2989 [inline] sysctl_compaction_handler+0x141/0x210 mm/compaction.c:2976 proc_sys_call_handler+0x440/0x570 fs/proc/proc_sysctl.c:600 iter_file_splice_write+0x91f/0x1150 fs/splice.c:738 do_splice_from fs/splice.c:935 [inline] direct_splice_actor+0x192/0x6c0 fs/splice.c:1158 splice_direct_to_actor+0x345/0xa30 fs/splice.c:1102 do_splice_direct_actor fs/splice.c:1201 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1227 do_sendfile+0xb06/0xe50 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1425 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __x64_sys_sendfile64+0x154/0x220 fs/read_write.c:1417 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 RIP: 0033:0x7f36c158eb69 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:00007f36c23e5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f36c17b5fa0 RCX: 00007f36c158eb69 RDX: 00002000000000c0 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f36c1611df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f36c17b5fa0 R15: 00007ffd6c00e3d8 Allocated by task 31875: 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:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 gfs2_inode_lookup+0x277/0x8a0 fs/gfs2/inode.c:135 gfs2_dir_search+0x22a/0x2e0 fs/gfs2/dir.c:1665 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+0x1be2/0x2d30 fs/gfs2/ops_fstype.c:1253 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 23: 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:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4782 gfs2_glock_dealloc+0xd0/0x150 fs/gfs2/glock.c:135 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160 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 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:3123 gfs2_glock_free+0x35/0x90 fs/gfs2/glock.c:178 glock_work_func+0x396/0x4d0 fs/gfs2/glock.c:1107 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 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:2184 __queue_work+0x97e/0x1160 kernel/workqueue.c:2339 __queue_delayed_work+0x35b/0x460 kernel/workqueue.c:2507 queue_delayed_work_on+0x1b5/0x200 kernel/workqueue.c:2559 queue_delayed_work include/linux/workqueue.h:684 [inline] gfs2_glock_queue_work+0x75/0x120 fs/gfs2/glock.c:250 clear_glock+0xa7/0xe0 fs/gfs2/glock.c:2153 glock_hash_walk+0x12c/0x1c0 fs/gfs2/glock.c:2083 gfs2_gl_hash_clear+0x103/0x780 fs/gfs2/glock.c:2209 gfs2_fill_super+0x2524/0x2d30 fs/gfs2/ops_fstype.c:1306 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 do_new_mount fs/namespace.c:3805 [inline] path_mount+0x1482/0x1fd0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4321 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 ffff8880788d0fd8 which belongs to the cache gfs2_glock(aspace) of size 1224 The buggy address is located 984 bytes inside of freed 1224-byte region [ffff8880788d0fd8, ffff8880788d14a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880788d0548 pfn:0x788d0 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 ffff888146ef3b40 dead000000000122 0000000000000000 raw: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888146ef3b40 dead000000000122 0000000000000000 head: ffff8880788d0548 00000000800c0007 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001e23401 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 31875, tgid 31874 (syz.6.10882), ts 1229886871877, free_ts 1229839928771 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xd1e/0x1780 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4236 gfs2_glock_get+0x1e5/0x1230 fs/gfs2/glock.c:1182 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+0x1967/0x2d30 fs/gfs2/ops_fstype.c:1220 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1692 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8e/0x340 fs/super.c:1815 page last free pid 5206 tgid 5206 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4236 locks_alloc_lock fs/locks.c:275 [inline] flock_lock_inode+0xbe8/0x1030 fs/locks.c:1091 flock_lock_inode_wait fs/locks.c:2084 [inline] locks_lock_inode_wait+0x1da/0x490 fs/locks.c:2111 locks_lock_file_wait include/linux/filelock.h:427 [inline] __do_sys_flock+0x446/0x520 fs/locks.c:2179 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 Memory state around the buggy address: ffff8880788d1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880788d1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880788d1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880788d1480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================