====================================================== WARNING: possible circular locking dependency detected 6.13.0-rc7-syzkaller-g1950a0af2d55 #0 Not tainted ------------------------------------------------------ kswapd0/75 is trying to acquire lock: ffff80008fa1fc10 (cpu_hotplug_lock){++++}-{0:0}, at: acomp_ctx_get_cpu mm/zswap.c:886 [inline] ffff80008fa1fc10 (cpu_hotplug_lock){++++}-{0:0}, at: zswap_compress mm/zswap.c:908 [inline] ffff80008fa1fc10 (cpu_hotplug_lock){++++}-{0:0}, at: zswap_store_page mm/zswap.c:1439 [inline] ffff80008fa1fc10 (cpu_hotplug_lock){++++}-{0:0}, at: zswap_store+0x834/0x185c mm/zswap.c:1546 but task is already holding lock: ffff80008fc71b00 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x1198/0x1d30 mm/vmscan.c:6998 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:3853 [inline] fs_reclaim_acquire+0x84/0x120 mm/page_alloc.c:3867 might_alloc include/linux/sched/mm.h:318 [inline] slab_pre_alloc_hook mm/slub.c:4070 [inline] slab_alloc_node mm/slub.c:4148 [inline] __kmalloc_cache_node_noprof+0x5c/0x434 mm/slub.c:4337 kmalloc_node_noprof include/linux/slab.h:924 [inline] alloc_worker kernel/workqueue.c:2645 [inline] create_worker+0x110/0x644 kernel/workqueue.c:2788 workqueue_prepare_cpu+0xf0/0x180 kernel/workqueue.c:6635 cpuhp_invoke_callback+0x404/0x704 kernel/cpu.c:194 __cpuhp_invoke_callback_range kernel/cpu.c:965 [inline] cpuhp_invoke_callback_range kernel/cpu.c:989 [inline] cpuhp_up_callbacks kernel/cpu.c:1020 [inline] _cpu_up+0x3c8/0x70c kernel/cpu.c:1690 cpu_up+0x150/0x1d8 kernel/cpu.c:1722 cpuhp_bringup_mask+0xb8/0x220 kernel/cpu.c:1788 bringup_nonboot_cpus+0x48/0x4c kernel/cpu.c:1896 smp_init+0x3c/0x12c kernel/smp.c:1009 kernel_init_freeable+0x30c/0x478 init/main.c:1569 kernel_init+0x24/0x2a0 init/main.c:1466 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 -> #0 (cpu_hotplug_lock){++++}-{0:0}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x34f0/0x7904 kernel/locking/lockdep.c:5226 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5849 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] cpus_read_lock+0x58/0x2a4 kernel/cpu.c:490 acomp_ctx_get_cpu mm/zswap.c:886 [inline] zswap_compress mm/zswap.c:908 [inline] zswap_store_page mm/zswap.c:1439 [inline] zswap_store+0x834/0x185c mm/zswap.c:1546 swap_writepage+0x958/0xf80 mm/page_io.c:279 shmem_writepage+0x1064/0x1374 mm/shmem.c:1579 pageout mm/vmscan.c:696 [inline] shrink_folio_list+0x29a4/0x498c mm/vmscan.c:1374 shrink_inactive_list mm/vmscan.c:1967 [inline] shrink_list mm/vmscan.c:2205 [inline] shrink_lruvec+0x11dc/0x2758 mm/vmscan.c:5734 shrink_node_memcgs mm/vmscan.c:5936 [inline] shrink_node+0xf64/0x2668 mm/vmscan.c:5977 kswapd_shrink_node mm/vmscan.c:6792 [inline] balance_pgdat+0x101c/0x1d30 mm/vmscan.c:6984 kswapd+0x810/0x10e0 mm/vmscan.c:7253 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(cpu_hotplug_lock); lock(fs_reclaim); rlock(cpu_hotplug_lock); *** DEADLOCK *** 1 lock held by kswapd0/75: #0: ffff80008fc71b00 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x1198/0x1d30 mm/vmscan.c:6998 stack backtrace: CPU: 0 UID: 0 PID: 75 Comm: kswapd0 Not tainted 6.13.0-rc7-syzkaller-g1950a0af2d55 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x154/0x1c0 kernel/locking/lockdep.c:2074 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x34f0/0x7904 kernel/locking/lockdep.c:5226 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5849 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] cpus_read_lock+0x58/0x2a4 kernel/cpu.c:490 acomp_ctx_get_cpu mm/zswap.c:886 [inline] zswap_compress mm/zswap.c:908 [inline] zswap_store_page mm/zswap.c:1439 [inline] zswap_store+0x834/0x185c mm/zswap.c:1546 swap_writepage+0x958/0xf80 mm/page_io.c:279 shmem_writepage+0x1064/0x1374 mm/shmem.c:1579 pageout mm/vmscan.c:696 [inline] shrink_folio_list+0x29a4/0x498c mm/vmscan.c:1374 shrink_inactive_list mm/vmscan.c:1967 [inline] shrink_list mm/vmscan.c:2205 [inline] shrink_lruvec+0x11dc/0x2758 mm/vmscan.c:5734 shrink_node_memcgs mm/vmscan.c:5936 [inline] shrink_node+0xf64/0x2668 mm/vmscan.c:5977 kswapd_shrink_node mm/vmscan.c:6792 [inline] balance_pgdat+0x101c/0x1d30 mm/vmscan.c:6984 kswapd+0x810/0x10e0 mm/vmscan.c:7253 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862