================================================================== 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/0x520 fs/xfs/xfs_buf.c:1194 Read of size 4 at addr ffffc9000635fb9c by task kswapd0/112 CPU: 3 PID: 112 Comm: kswapd0 Not tainted 6.10.0-rc5-syzkaller-00018-g55027e689933 #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/0x520 fs/xfs/xfs_buf.c:1194 xfs_buf_delwri_submit_buffers+0x140/0xa40 fs/xfs/xfs_buf.c:2293 xfs_buf_delwri_submit+0x8a/0x270 fs/xfs/xfs_buf.c:2371 xfs_qm_shrink_scan+0x209/0x3f0 fs/xfs/xfs_qm.c:522 do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435 shrink_slab+0x18a/0x1310 mm/shrinker.c:662 shrink_one+0x493/0x7c0 mm/vmscan.c:4790 shrink_many mm/vmscan.c:4851 [inline] lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4951 shrink_node mm/vmscan.c:5910 [inline] kswapd_shrink_node mm/vmscan.c:6720 [inline] balance_pgdat+0x1105/0x1970 mm/vmscan.c:6911 kswapd+0x5ea/0xbf0 mm/vmscan.c:7180 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the virtual mapping at [ffffc90006358000, ffffc90006361000) created by: kernel_clone+0xfd/0x980 kernel/fork.c:2797 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888055973f00 pfn:0x55973 memcg:ffff888022efe702 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff888055973f00 0000000000000000 00000001ffffffff ffff888022efe702 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 177030105819, free_ts 176828397518 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x136a/0x2e50 mm/page_alloc.c:3420 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4678 alloc_pages_mpol_noprof+0x275/0x610 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3566 [inline] __vmalloc_area_node mm/vmalloc.c:3642 [inline] __vmalloc_node_range_noprof+0xa6a/0x1520 mm/vmalloc.c:3823 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct kernel/fork.c:1115 [inline] copy_process+0x29f5/0x6f50 kernel/fork.c:2220 kernel_clone+0xfd/0x980 kernel/fork.c:2797 kernel_thread+0xc0/0x100 kernel/fork.c:2859 create_kthread kernel/kthread.c:412 [inline] kthreadd+0x4ef/0x7d0 kernel/kthread.c:765 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 5309 tgid 5191 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2583 __folio_put+0x239/0x360 mm/swap.c:129 folio_put include/linux/mm.h:1508 [inline] free_page_and_swap_cache+0x249/0x2c0 mm/swap_state.c:305 __tlb_remove_table arch/x86/include/asm/tlb.h:34 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x89/0xe0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2535 [inline] rcu_core+0x828/0x16b0 kernel/rcu/tree.c:2809 handle_softirqs+0x216/0x8f0 kernel/softirq.c:554 do_softirq kernel/softirq.c:455 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:442 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:382 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:851 [inline] __dev_queue_xmit+0x872/0x4130 net/core/dev.c:4420 dev_queue_xmit include/linux/netdevice.h:3095 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip_finish_output2+0x16bf/0x2590 net/ipv4/ip_output.c:235 __ip_finish_output net/ipv4/ip_output.c:313 [inline] __ip_finish_output+0x49e/0x950 net/ipv4/ip_output.c:295 ip_finish_output+0x31/0x310 net/ipv4/ip_output.c:323 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x13b/0x2a0 net/ipv4/ip_output.c:433 dst_output include/net/dst.h:450 [inline] ip_local_out+0x33e/0x4a0 net/ipv4/ip_output.c:129 __ip_queue_xmit+0x747/0x1940 net/ipv4/ip_output.c:535 __tcp_transmit_skb+0x29c1/0x3da0 net/ipv4/tcp_output.c:1466 Memory state around the buggy address: ffffc9000635fa80: 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000635fb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000635fb80: 00 f1 f1 f1 f1 04 f2 04 f2 00 f3 f3 f3 00 00 00 ^ ffffc9000635fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000635fc80: 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 04 f2 04 f3 ==================================================================