====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.2.266/5802 is trying to acquire lock: ffff800088bb4360 (pcpu_alloc_mutex){+.+.}-{4:4}, at: pcpu_alloc_noprof+0x218/0x168c mm/percpu.c:1788 but task is already holding lock: ffff0000c7d33810 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x20/0x38 block/blk-mq.c:206 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&q->q_usage_counter(io)#17){++++}-{0:0}: blk_alloc_queue+0x47c/0x57c block/blk-core.c:461 blk_mq_alloc_queue+0x148/0x294 block/blk-mq.c:4469 __blk_mq_alloc_disk+0x38/0x10c block/blk-mq.c:4516 loop_add+0x34c/0x8b8 drivers/block/loop.c:2049 loop_init+0xe8/0x10c drivers/block/loop.c:2288 do_one_initcall+0x274/0xc20 init/main.c:1392 do_initcall_level+0x128/0x1c4 init/main.c:1454 do_initcalls+0x70/0xd0 init/main.c:1470 do_basic_setup+0x7c/0x90 init/main.c:1490 kernel_init_freeable+0x268/0x3a8 init/main.c:1703 kernel_init+0x24/0x1dc init/main.c:1593 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:842 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:4325 [inline] fs_reclaim_acquire+0x90/0x110 mm/page_alloc.c:4339 might_alloc include/linux/sched/mm.h:317 [inline] prepare_alloc_pages+0x140/0x4b0 mm/page_alloc.c:4995 __alloc_frozen_pages_noprof+0x134/0x31c mm/page_alloc.c:5215 __alloc_pages_noprof+0x18/0x100 mm/page_alloc.c:5260 __alloc_pages_node_noprof include/linux/gfp.h:289 [inline] alloc_pages_node_noprof include/linux/gfp.h:316 [inline] pcpu_alloc_pages mm/percpu-vm.c:95 [inline] pcpu_populate_chunk+0x1c4/0x7f0 mm/percpu-vm.c:285 pcpu_alloc_noprof+0x878/0x168c mm/percpu.c:1876 xt_percpu_counter_alloc+0xa4/0x1e4 net/netfilter/x_tables.c:2137 find_check_entry net/ipv6/netfilter/ip6_tables.c:545 [inline] translate_table+0xe58/0x1824 net/ipv6/netfilter/ip6_tables.c:733 ip6t_register_table+0xf8/0x2ac net/ipv6/netfilter/ip6_tables.c:1748 ip6table_nat_table_init+0x54/0x23c net/ipv6/netfilter/ip6table_nat.c:116 xt_find_table_lock+0x228/0x3c0 net/netfilter/x_tables.c:1353 xt_request_find_table_lock+0x38/0x118 net/netfilter/x_tables.c:1378 get_info net/ipv6/netfilter/ip6_tables.c:979 [inline] do_ip6t_get_ctl+0x58c/0x107c net/ipv6/netfilter/ip6_tables.c:1668 nf_getsockopt+0x90/0xd0 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x220/0x3b0 net/ipv6/ipv6_sockglue.c:1464 tcp_getsockopt+0xcc/0xe8 net/ipv4/tcp.c:4870 sock_common_getsockopt+0xa8/0xc4 net/core/sock.c:3967 do_sock_getsockopt+0x354/0x790 net/socket.c:2487 __sys_getsockopt+0xfc/0x168 net/socket.c:2518 __do_sys_getsockopt net/socket.c:2525 [inline] __se_sys_getsockopt net/socket.c:2522 [inline] __arm64_sys_getsockopt+0xb8/0xd4 net/socket.c:2522 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:740 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:759 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 -> #0 (pcpu_alloc_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1780/0x2f44 kernel/locking/lockdep.c:5237 lock_acquire+0x140/0x368 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x160/0xef8 kernel/locking/mutex.c:820 _mutex_lock_killable+0x24/0x30 kernel/locking/mutex.c:891 pcpu_alloc_noprof+0x218/0x168c mm/percpu.c:1788 __percpu_counter_init_many+0x50/0x334 lib/percpu_counter.c:198 blkg_rwstat_init+0x40/0xc8 block/blk-cgroup-rwstat.c:12 throtl_pd_alloc+0xcc/0x348 block/blk-throttle.c:271 blkcg_activate_policy+0x558/0x994 block/blk-cgroup.c:1647 blk_throtl_init+0x29c/0x39c block/blk-throttle.c:1330 tg_set_conf+0x238/0x478 block/blk-throttle.c:1359 tg_set_conf_u64+0x38/0x4c block/blk-throttle.c:1392 cgroup_file_write+0x238/0x6d8 kernel/cgroup/cgroup.c:4281 kernfs_fop_write_iter+0x264/0x3c0 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x52c/0xa14 fs/read_write.c:688 ksys_write+0x12c/0x224 fs/read_write.c:740 __do_sys_write fs/read_write.c:751 [inline] __se_sys_write fs/read_write.c:748 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:748 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:740 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:759 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594 other info that might help us debug this: Chain exists of: pcpu_alloc_mutex --> fs_reclaim --> &q->q_usage_counter(io)#17 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&q->q_usage_counter(io)#17); lock(fs_reclaim); lock(&q->q_usage_counter(io)#17); lock(pcpu_alloc_mutex); *** DEADLOCK *** 7 locks held by syz.2.266/5802: #0: ffff0000db9a40f0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x100/0x144 fs/file.c:1261 #1: ffff0000d31c6410 (sb_writers#8){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2724 [inline] #1: ffff0000d31c6410 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x240/0xa14 fs/read_write.c:684 #2: ffff0000cf07bc80 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1b4/0x3c0 fs/kernfs/file.c:343 #3: ffff0001010d51e8 (kn->active#61){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:80 [inline] #3: ffff0001010d51e8 (kn->active#61){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x1f4/0x3c0 fs/kernfs/file.c:344 #4: ffff0000c7d33a10 (&q->rq_qos_mutex){+.+.}-{4:4}, at: blkg_conf_open_bdev+0x214/0x34c block/blk-cgroup.c:805 #5: ffff0000c7d33810 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x20/0x38 block/blk-mq.c:206 #6: ffff0000c7d33848 (&q->q_usage_counter(queue)){+.+.}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x20/0x38 block/blk-mq.c:206 stack backtrace: CPU: 0 UID: 0 PID: 5802 Comm: syz.2.266 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x328/0x330 kernel/locking/lockdep.c:2043 check_noncircular+0x158/0x174 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1780/0x2f44 kernel/locking/lockdep.c:5237 lock_acquire+0x140/0x368 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x160/0xef8 kernel/locking/mutex.c:820 _mutex_lock_killable+0x24/0x30 kernel/locking/mutex.c:891 pcpu_alloc_noprof+0x218/0x168c mm/percpu.c:1788 __percpu_counter_init_many+0x50/0x334 lib/percpu_counter.c:198 blkg_rwstat_init+0x40/0xc8 block/blk-cgroup-rwstat.c:12 throtl_pd_alloc+0xcc/0x348 block/blk-throttle.c:271 blkcg_activate_policy+0x558/0x994 block/blk-cgroup.c:1647 blk_throtl_init+0x29c/0x39c block/blk-throttle.c:1330 tg_set_conf+0x238/0x478 block/blk-throttle.c:1359 tg_set_conf_u64+0x38/0x4c block/blk-throttle.c:1392 cgroup_file_write+0x238/0x6d8 kernel/cgroup/cgroup.c:4281 kernfs_fop_write_iter+0x264/0x3c0 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x52c/0xa14 fs/read_write.c:688 ksys_write+0x12c/0x224 fs/read_write.c:740 __do_sys_write fs/read_write.c:751 [inline] __se_sys_write fs/read_write.c:748 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:748 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:140 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:740 el0t_64_sync_handler+0x48/0x148 arch/arm64/kernel/entry-common.c:759 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:594