====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.1.1315/10344 is trying to acquire lock: ffffffff8ea5f7c0 (pcpu_alloc_mutex){+.+.}-{4:4}, at: pcpu_alloc_noprof+0x261/0x19c0 mm/percpu.c:1788 but task is already holding lock: ffff8880266b3840 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue include/linux/blk-mq.h:956 [inline] ffff8880266b3840 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_throtl_init+0x279/0x410 block/blk-throttle.c:1323 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+0x546/0x680 block/blk-core.c:461 blk_mq_alloc_queue block/blk-mq.c:4469 [inline] __blk_mq_alloc_disk+0x197/0x390 block/blk-mq.c:4516 loop_add+0x482/0xb40 drivers/block/loop.c:2049 loop_init+0xd9/0x170 drivers/block/loop.c:2288 do_one_initcall+0x250/0x870 init/main.c:1392 do_initcall_level+0x104/0x190 init/main.c:1454 do_initcalls+0x59/0xa0 init/main.c:1470 kernel_init_freeable+0x2a6/0x3e0 init/main.c:1703 kernel_init+0x1d/0x1d0 init/main.c:1593 ret_from_fork+0x514/0xb70 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:4325 [inline] fs_reclaim_acquire+0x71/0x100 mm/page_alloc.c:4339 might_alloc include/linux/sched/mm.h:317 [inline] prepare_alloc_pages+0x152/0x650 mm/page_alloc.c:4995 __alloc_frozen_pages_noprof+0x12f/0x380 mm/page_alloc.c:5215 __alloc_pages_noprof+0x10/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+0x182/0xb30 mm/percpu-vm.c:285 pcpu_alloc_noprof+0xcc2/0x19c0 mm/percpu.c:1876 xt_percpu_counter_alloc+0x161/0x220 net/netfilter/x_tables.c:2137 find_check_entry net/ipv6/netfilter/ip6_tables.c:545 [inline] translate_table+0x1332/0x20b0 net/ipv6/netfilter/ip6_tables.c:733 ip6t_register_table+0x11b/0x330 net/ipv6/netfilter/ip6_tables.c:1748 ip6table_filter_table_init+0x75/0xb0 net/ipv6/netfilter/ip6table_filter.c:48 xt_find_table_lock+0x30c/0x3f0 net/netfilter/x_tables.c:1353 xt_request_find_table_lock+0x26/0x100 net/netfilter/x_tables.c:1378 get_info net/ipv6/netfilter/ip6_tables.c:979 [inline] do_ip6t_get_ctl+0x716/0x1230 net/ipv6/netfilter/ip6_tables.c:1668 nf_getsockopt+0x26e/0x290 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x1fd/0x2b0 net/ipv6/ipv6_sockglue.c:1464 do_sock_getsockopt+0x51d/0x7e0 net/socket.c:2487 __sys_getsockopt+0x127/0x1c0 net/socket.c:2518 __do_compat_sys_socketcall net/compat.c:494 [inline] __se_compat_sys_socketcall net/compat.c:423 [inline] __ia32_compat_sys_socketcall+0x86a/0xa10 net/compat.c:423 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0x229/0x6e0 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #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+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x1a3/0x1550 kernel/locking/mutex.c:820 pcpu_alloc_noprof+0x261/0x19c0 mm/percpu.c:1788 __percpu_counter_init_many+0x43/0x380 lib/percpu_counter.c:198 blkg_rwstat_init+0x2c/0x170 block/blk-cgroup-rwstat.c:12 throtl_pd_alloc+0xb6/0x460 block/blk-throttle.c:271 blkcg_activate_policy+0x692/0xb40 block/blk-cgroup.c:1647 blk_throtl_init+0x2f6/0x410 block/blk-throttle.c:1330 tg_set_conf+0x1d6/0x4c0 block/blk-throttle.c:1359 cgroup_file_write+0x331/0x8f0 kernel/cgroup/cgroup.c:4281 kernfs_fop_write_iter+0x3af/0x540 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x61d/0xb90 fs/read_write.c:688 ksys_write+0x150/0x270 fs/read_write.c:740 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0x229/0x6e0 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e 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.1.1315/10344: #0: ffff88803365d430 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x246/0x320 fs/file.c:1261 #1: ffff888025fb8410 (sb_writers#10){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2724 [inline] #1: ffff888025fb8410 (sb_writers#10){.+.+}-{0:0}, at: vfs_write+0x227/0xb90 fs/read_write.c:684 #2: ffff888056905080 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1de/0x540 fs/kernfs/file.c:343 #3: ffff8880576975a8 (kn->active#78){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:80 [inline] #3: ffff8880576975a8 (kn->active#78){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x231/0x540 fs/kernfs/file.c:344 #4: ffff8880266b3a40 (&q->rq_qos_mutex){+.+.}-{4:4}, at: blkg_conf_open_bdev+0x2b0/0x3c0 block/blk-cgroup.c:805 #5: ffff8880266b3840 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue include/linux/blk-mq.h:956 [inline] #5: ffff8880266b3840 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_throtl_init+0x279/0x410 block/blk-throttle.c:1323 #6: ffff8880266b3878 (&q->q_usage_counter(queue)){+.+.}-{0:0}, at: blk_mq_freeze_queue include/linux/blk-mq.h:956 [inline] #6: ffff8880266b3878 (&q->q_usage_counter(queue)){+.+.}-{0:0}, at: blk_throtl_init+0x279/0x410 block/blk-throttle.c:1323 stack backtrace: CPU: 0 UID: 0 PID: 10344 Comm: syz.1.1315 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043 check_noncircular+0x12e/0x150 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+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x1a3/0x1550 kernel/locking/mutex.c:820 pcpu_alloc_noprof+0x261/0x19c0 mm/percpu.c:1788 __percpu_counter_init_many+0x43/0x380 lib/percpu_counter.c:198 blkg_rwstat_init+0x2c/0x170 block/blk-cgroup-rwstat.c:12 throtl_pd_alloc+0xb6/0x460 block/blk-throttle.c:271 blkcg_activate_policy+0x692/0xb40 block/blk-cgroup.c:1647 blk_throtl_init+0x2f6/0x410 block/blk-throttle.c:1330 tg_set_conf+0x1d6/0x4c0 block/blk-throttle.c:1359 cgroup_file_write+0x331/0x8f0 kernel/cgroup/cgroup.c:4281 kernfs_fop_write_iter+0x3af/0x540 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x61d/0xb90 fs/read_write.c:688 ksys_write+0x150/0x270 fs/read_write.c:740 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0x229/0x6e0 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf706f01c Code: 90 85 d2 74 0a 89 ce 81 e6 ff 0f 00 00 89 32 85 c0 74 05 c1 e9 0c 89 08 31 c0 5e 5d c3 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 58 b8 RSP: 002b:00000000f545d50c EFLAGS: 00000206 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00000000800000c0 RDX: 000000000000006a RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 90 nop 1: 85 d2 test %edx,%edx 3: 74 0a je 0xf 5: 89 ce mov %ecx,%esi 7: 81 e6 ff 0f 00 00 and $0xfff,%esi d: 89 32 mov %esi,(%rdx) f: 85 c0 test %eax,%eax 11: 74 05 je 0x18 13: c1 e9 0c shr $0xc,%ecx 16: 89 08 mov %ecx,(%rax) 18: 31 c0 xor %eax,%eax 1a: 5e pop %rsi 1b: 5d pop %rbp 1c: c3 ret 1d: 90 nop 1e: 0f 1f 00 nopl (%rax) 21: 51 push %rcx 22: 52 push %rdx 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 ret 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 90 nop 33: 90 nop 34: 90 nop 35: 90 nop 36: 90 nop 37: 90 nop 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 58 pop %rax 3f: b8 .byte 0xb8