====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.3.2133/13704 is trying to acquire lock: ffffffff8e53c928 (pcpu_alloc_mutex){+.+.}-{4:4}, at: pcpu_alloc_noprof+0xb5a/0x1470 mm/percpu.c:1782 but task is already holding lock: ffff8880263a9cf8 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x15/0x20 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+0x610/0x750 block/blk-core.c:461 blk_mq_alloc_queue+0x172/0x280 block/blk-mq.c:4415 __blk_mq_alloc_disk+0x29/0x120 block/blk-mq.c:4462 loop_add+0x490/0xb70 drivers/block/loop.c:2071 loop_init+0x164/0x270 drivers/block/loop.c:2310 do_one_initcall+0x123/0x680 init/main.c:1378 do_initcall_level init/main.c:1440 [inline] do_initcalls init/main.c:1456 [inline] do_basic_setup init/main.c:1475 [inline] kernel_init_freeable+0x5c8/0x920 init/main.c:1688 kernel_init+0x1c/0x2b0 init/main.c:1578 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:4331 [inline] fs_reclaim_acquire+0x102/0x150 mm/page_alloc.c:4345 might_alloc include/linux/sched/mm.h:317 [inline] prepare_alloc_pages+0x162/0x670 mm/page_alloc.c:5008 __alloc_frozen_pages_noprof+0x18b/0x2430 mm/page_alloc.c:5229 __alloc_pages_noprof+0xb/0x1b0 mm/page_alloc.c:5274 __alloc_pages_node_noprof include/linux/gfp.h:285 [inline] alloc_pages_node_noprof include/linux/gfp.h:312 [inline] pcpu_alloc_pages mm/percpu-vm.c:95 [inline] pcpu_populate_chunk+0x110/0xb10 mm/percpu-vm.c:285 pcpu_alloc_noprof+0x86b/0x1470 mm/percpu.c:1870 xt_percpu_counter_alloc+0x13e/0x1b0 net/netfilter/x_tables.c:1934 find_check_entry.constprop.0+0xbc/0x9b0 net/ipv4/netfilter/ip_tables.c:526 translate_table+0xc98/0x1720 net/ipv4/netfilter/ip_tables.c:716 ipt_register_table+0x102/0x430 net/ipv4/netfilter/ip_tables.c:1742 iptable_raw_table_init+0x63/0x90 net/ipv4/netfilter/iptable_raw.c:49 xt_find_table_lock+0x2e4/0x520 net/netfilter/x_tables.c:1260 xt_request_find_table_lock+0x28/0xf0 net/netfilter/x_tables.c:1285 get_info+0x19c/0x7c0 net/ipv4/netfilter/ip_tables.c:963 do_ipt_get_ctl+0x169/0xaa0 net/ipv4/netfilter/ip_tables.c:1659 nf_getsockopt+0x7c/0xe0 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x18c/0x1e0 net/ipv4/ip_sockglue.c:1777 tcp_getsockopt+0xa1/0x100 net/ipv4/tcp.c:4832 do_sock_getsockopt+0x324/0x410 net/socket.c:2383 __sys_getsockopt+0x12f/0x260 net/socket.c:2412 __do_sys_getsockopt net/socket.c:2419 [inline] __se_sys_getsockopt net/socket.c:2416 [inline] __x64_sys_getsockopt+0xbd/0x160 net/socket.c:2416 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #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+0x1669/0x2890 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x179/0x330 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1aa/0x1ca0 kernel/locking/mutex.c:776 pcpu_alloc_noprof+0xb5a/0x1470 mm/percpu.c:1782 __percpu_counter_init_many+0x42/0x3b0 lib/percpu_counter.c:198 blkg_rwstat_init+0x2c/0xd0 block/blk-cgroup-rwstat.c:12 throtl_pd_alloc+0xf1/0xa50 block/blk-throttle.c:271 blkcg_activate_policy+0x7e6/0xf00 block/blk-cgroup.c:1632 blk_throtl_init+0x3bc/0x5e0 block/blk-throttle.c:1330 tg_set_conf.constprop.0+0x3ca/0x560 block/blk-throttle.c:1359 cgroup_file_write+0x1e9/0x790 kernel/cgroup/cgroup.c:4312 kernfs_fop_write_iter+0x3af/0x570 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x7d3/0x11d0 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f 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.3.2133/13704: #0: ffff888033d04b78 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x2a2/0x370 fs/file.c:1255 #1: ffff888058aa2420 (sb_writers#11){.+.+}-{0:0}, at: ksys_write+0x12a/0x250 fs/read_write.c:738 #2: ffff88805ed8c488 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x28f/0x570 fs/kernfs/file.c:343 #3: ffff888079e7b008 (kn->active#76){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:80 [inline] #3: ffff888079e7b008 (kn->active#76){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x2ff/0x570 fs/kernfs/file.c:344 #4: ffff8880263a9f00 (&q->rq_qos_mutex){+.+.}-{4:4}, at: blkg_conf_open_bdev+0x2a7/0x410 block/blk-cgroup.c:802 #5: ffff8880263a9cf8 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x15/0x20 block/blk-mq.c:206 #6: ffff8880263a9d30 (&q->q_usage_counter(queue)){+.+.}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x15/0x20 block/blk-mq.c:206 stack backtrace: CPU: 0 UID: 0 PID: 13704 Comm: syz.3.2133 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x275/0x340 kernel/locking/lockdep.c:2043 check_noncircular+0x146/0x160 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+0x1669/0x2890 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x179/0x330 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1aa/0x1ca0 kernel/locking/mutex.c:776 pcpu_alloc_noprof+0xb5a/0x1470 mm/percpu.c:1782 __percpu_counter_init_many+0x42/0x3b0 lib/percpu_counter.c:198 blkg_rwstat_init+0x2c/0xd0 block/blk-cgroup-rwstat.c:12 throtl_pd_alloc+0xf1/0xa50 block/blk-throttle.c:271 blkcg_activate_policy+0x7e6/0xf00 block/blk-cgroup.c:1632 blk_throtl_init+0x3bc/0x5e0 block/blk-throttle.c:1330 tg_set_conf.constprop.0+0x3ca/0x560 block/blk-throttle.c:1359 cgroup_file_write+0x1e9/0x790 kernel/cgroup/cgroup.c:4312 kernfs_fop_write_iter+0x3af/0x570 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x7d3/0x11d0 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9ef5b8f749 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:00007f9ef6a45038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f9ef5de5fa0 RCX: 00007f9ef5b8f749 RDX: 000000000000006a RSI: 00002000000000c0 RDI: 0000000000000005 RBP: 00007f9ef6a45090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007f9ef5de6038 R14: 00007f9ef5de5fa0 R15: 00007ffd3124c218