====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.3.731/8758 is trying to acquire lock: ffffffff8e972d48 (pcpu_alloc_mutex){+.+.}-{4:4}, at: pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 but task is already holding lock: ffff8880273f3990 (&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/0x790 block/blk-core.c:461 blk_mq_alloc_queue+0x174/0x290 block/blk-mq.c:4429 __blk_mq_alloc_disk+0x29/0x120 block/blk-mq.c:4476 loop_add+0x498/0xb60 drivers/block/loop.c:2049 loop_init+0x1d3/0x200 drivers/block/loop.c:2288 do_one_initcall+0x11d/0x760 init/main.c:1382 do_initcall_level init/main.c:1444 [inline] do_initcalls init/main.c:1460 [inline] do_basic_setup init/main.c:1479 [inline] kernel_init_freeable+0x6e5/0x7a0 init/main.c:1692 kernel_init+0x1f/0x1e0 init/main.c:1582 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:4348 [inline] fs_reclaim_acquire+0xc4/0x100 mm/page_alloc.c:4362 might_alloc include/linux/sched/mm.h:317 [inline] prepare_alloc_pages+0x166/0x5f0 mm/page_alloc.c:5018 __alloc_frozen_pages_noprof+0x19a/0x2ba0 mm/page_alloc.c:5239 __alloc_pages_noprof+0xb/0x1b0 mm/page_alloc.c:5284 __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+0x118/0x990 mm/percpu-vm.c:285 pcpu_alloc_noprof+0x833/0x1c50 mm/percpu.c:1876 xt_percpu_counter_alloc+0x13e/0x1b0 net/netfilter/x_tables.c:1934 find_check_entry.isra.0+0xbf/0x990 net/ipv4/netfilter/ip_tables.c:526 translate_table+0xbcd/0x1630 net/ipv4/netfilter/ip_tables.c:716 ipt_register_table+0x106/0x420 net/ipv4/netfilter/ip_tables.c:1742 iptable_raw_table_init+0x63/0x90 net/ipv4/netfilter/iptable_raw.c:49 xt_find_table_lock+0x2df/0x520 net/netfilter/x_tables.c:1260 xt_request_find_table_lock+0x28/0xf0 net/netfilter/x_tables.c:1285 get_info+0x1a7/0x790 net/ipv4/netfilter/ip_tables.c:963 do_ipt_get_ctl+0x168/0xa80 net/ipv4/netfilter/ip_tables.c:1659 nf_getsockopt+0x7c/0xe0 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x192/0x1e0 net/ipv4/ip_sockglue.c:1777 tcp_getsockopt+0xa1/0x110 net/ipv4/tcp.c:4893 do_sock_getsockopt+0x259/0x3d0 net/socket.c:2383 __sys_getsockopt+0x148/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+0x106/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+0x14b8/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1a2/0x1b90 kernel/locking/mutex.c:776 pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 __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+0x7bb/0xe60 block/blk-cgroup.c:1632 blk_throtl_init+0x39a/0x5b0 block/blk-throttle.c:1330 tg_set_conf.isra.0+0x3c3/0x4b0 block/blk-throttle.c:1359 cgroup_file_write+0x1e9/0x790 kernel/cgroup/cgroup.c:4309 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1070 fs/read_write.c:688 ksys_write+0x12a/0x250 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/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.731/8758: #0: ffff88807cda6d38 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x2aa/0x380 fs/file.c:1261 #1: ffff888054eb2420 (sb_writers#11){.+.+}-{0:0}, at: ksys_write+0x12a/0x250 fs/read_write.c:740 #2: ffff8880338a3088 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x2c2/0x5f0 fs/kernfs/file.c:343 #3: ffff88805a9985a8 (kn->active#69){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:80 [inline] #3: ffff88805a9985a8 (kn->active#69){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x332/0x5f0 fs/kernfs/file.c:344 #4: ffff8880273f3b98 (&q->rq_qos_mutex){+.+.}-{4:4}, at: blkg_conf_open_bdev+0x2a7/0x410 block/blk-cgroup.c:802 #5: ffff8880273f3990 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x15/0x20 block/blk-mq.c:206 #6: ffff8880273f39c8 (&q->q_usage_counter(queue)){+.+.}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x15/0x20 block/blk-mq.c:206 stack backtrace: CPU: 1 UID: 0 PID: 8758 Comm: syz.3.731 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_circular_bug.cold+0x178/0x1c7 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+0x14b8/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1a2/0x1b90 kernel/locking/mutex.c:776 pcpu_alloc_noprof+0xedc/0x1c50 mm/percpu.c:1788 __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+0x7bb/0xe60 block/blk-cgroup.c:1632 blk_throtl_init+0x39a/0x5b0 block/blk-throttle.c:1330 tg_set_conf.isra.0+0x3c3/0x4b0 block/blk-throttle.c:1359 cgroup_file_write+0x1e9/0x790 kernel/cgroup/cgroup.c:4309 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1070 fs/read_write.c:688 ksys_write+0x12a/0x250 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff37839c799 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff379220028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff378616090 RCX: 00007ff37839c799 RDX: 000000000000006a RSI: 00002000000000c0 RDI: 0000000000000009 RBP: 00007ff379220090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ff378616128 R14: 00007ff378616090 R15: 00007ffe1d0cef78