================================================================== BUG: KASAN: stack-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: stack-out-of-bounds in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] BUG: KASAN: stack-out-of-bounds in xfs_buf_lock+0x9e/0x4c0 fs/xfs/xfs_buf.c:1191 Read of size 4 at addr ffffc90003877b74 by task kswapd0/104 CPU: 3 PID: 104 Comm: kswapd0 Not tainted 6.8.0-syzkaller-06619-ge5e038b7ae9d #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] xfs_buf_lock+0x9e/0x4c0 fs/xfs/xfs_buf.c:1191 xfs_buf_delwri_submit_buffers+0x140/0xa10 fs/xfs/xfs_buf.c:2290 xfs_buf_delwri_submit+0x8a/0x270 fs/xfs/xfs_buf.c:2368 xfs_qm_shrink_scan+0x209/0x3f0 fs/xfs/xfs_qm.c:522 do_shrink_slab+0x44f/0x1160 mm/shrinker.c:435 shrink_slab+0x18a/0x1310 mm/shrinker.c:662 shrink_one+0x493/0x7b0 mm/vmscan.c:4767 shrink_many mm/vmscan.c:4828 [inline] lru_gen_shrink_node mm/vmscan.c:4929 [inline] shrink_node+0x2191/0x3770 mm/vmscan.c:5888 kswapd_shrink_node mm/vmscan.c:6696 [inline] balance_pgdat+0x9d0/0x1a90 mm/vmscan.c:6886 kswapd+0x5c1/0xc10 mm/vmscan.c:7146 kthread+0x2c1/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 The buggy address belongs to the virtual mapping at [ffffc90003870000, ffffc90003879000) created by: kernel_clone+0xfd/0x940 kernel/fork.c:2796 The buggy address belongs to the physical page: page:ffffea0001374d80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4dd36 memcg:ffff888011900082 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888011900082 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 114680771987, free_ts 114518223609 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22b/0x2410 mm/page_alloc.c:4569 alloc_pages_mpol+0x258/0x600 mm/mempolicy.c:2133 vm_area_alloc_pages mm/vmalloc.c:3135 [inline] __vmalloc_area_node mm/vmalloc.c:3211 [inline] __vmalloc_node_range+0xa6b/0x1540 mm/vmalloc.c:3392 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct kernel/fork.c:1114 [inline] copy_process+0x1428/0x6ed0 kernel/fork.c:2219 kernel_clone+0xfd/0x940 kernel/fork.c:2796 kernel_thread+0xc0/0x100 kernel/fork.c:2858 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x4ef/0x7d0 kernel/kthread.c:764 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 page last free pid 5217 tgid 5217 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2346 free_unref_page_list+0xe6/0xb50 mm/page_alloc.c:2532 release_pages+0x32a/0x14f0 mm/swap.c:1042 __folio_batch_release+0x77/0xe0 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] mapping_try_invalidate+0x385/0x460 mm/truncate.c:526 invalidate_bdev+0xab/0xd0 block/bdev.c:96 generic_shutdown_super+0x159/0x3d0 fs/super.c:641 kill_block_super+0x3b/0x90 fs/super.c:1675 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2026 deactivate_locked_super+0xbe/0x1a0 fs/super.c:472 deactivate_super+0xde/0x100 fs/super.c:505 cleanup_mnt+0x222/0x450 fs/namespace.c:1267 task_work_run+0x14e/0x250 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:108 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x275/0x2a0 kernel/entry/common.c:212 __do_fast_syscall_32+0x8a/0x120 arch/x86/entry/common.c:324 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:346 Memory state around the buggy address: ffffc90003877a00: 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f3 f3 00 00 ffffc90003877a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90003877b00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ^ ffffc90003877b80: 04 f2 04 f2 00 f3 f3 f3 00 00 00 00 00 00 00 00 ffffc90003877c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================