====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.0.4363/18388 is trying to acquire lock: ffffffff8dec9998 (pcpu_alloc_mutex){+.+.}-{4:4}, at: pcpu_alloc_noprof+0x202/0x1950 mm/percpu.c:1788 but task is already holding lock: ffff8880258ad120 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue include/linux/blk-mq.h:956 [inline] ffff8880258ad120 (&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+0x54e/0x690 block/blk-core.c:461 blk_mq_alloc_queue block/blk-mq.c:4429 [inline] __blk_mq_alloc_disk+0x197/0x390 block/blk-mq.c:4476 loop_add+0x482/0xb50 drivers/block/loop.c:2049 loop_init+0xd9/0x170 drivers/block/loop.c:2288 do_one_initcall+0x250/0x8d0 init/main.c:1382 do_initcall_level+0x104/0x190 init/main.c:1444 do_initcalls+0x59/0xa0 init/main.c:1460 kernel_init_freeable+0x2a6/0x3e0 init/main.c:1692 kernel_init+0x1d/0x1d0 init/main.c:1582 ret_from_fork+0x51e/0xb90 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+0x71/0x100 mm/page_alloc.c:4362 might_alloc include/linux/sched/mm.h:317 [inline] prepare_alloc_pages+0x152/0x6b0 mm/page_alloc.c:5018 __alloc_frozen_pages_noprof+0x12f/0x380 mm/page_alloc.c:5239 __alloc_pages_noprof+0xa/0x30 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+0x182/0xb30 mm/percpu-vm.c:285 pcpu_alloc_noprof+0xc0f/0x1950 mm/percpu.c:1876 bpf_map_alloc_percpu+0x72/0x1f0 kernel/bpf/syscall.c:583 prealloc_init+0x217/0x640 kernel/bpf/hashtab.c:334 htab_map_alloc+0x69e/0xc90 kernel/bpf/hashtab.c:636 map_create+0xafd/0x16b0 kernel/bpf/syscall.c:1507 __sys_bpf+0x6e1/0x950 kernel/bpf/syscall.c:6231 __do_sys_bpf kernel/bpf/syscall.c:6362 [inline] __se_sys_bpf kernel/bpf/syscall.c:6360 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6360 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/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+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0xf0/0x2e0 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/rtmutex_api.c:533 [inline] _mutex_lock_killable+0x63/0x1d0 kernel/locking/rtmutex_api.c:573 pcpu_alloc_noprof+0x202/0x1950 mm/percpu.c:1788 __percpu_counter_init_many+0x43/0x370 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:1632 blk_throtl_init+0x2f6/0x410 block/blk-throttle.c:1330 tg_set_conf+0x1d6/0x4c0 block/blk-throttle.c:1359 cgroup_file_write+0x36f/0x790 kernel/cgroup/cgroup.c:4311 kernfs_fop_write_iter+0x3b0/0x540 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x629/0xba0 fs/read_write.c:688 ksys_write+0x156/0x270 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/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.0.4363/18388: #0: ffff8880395c7f28 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x252/0x320 fs/file.c:1261 #1: ffff88803d968480 (sb_writers#10){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2710 [inline] #1: ffff88803d968480 (sb_writers#10){.+.+}-{0:0}, at: vfs_write+0x22d/0xba0 fs/read_write.c:684 #2: ffff888029a00878 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1df/0x540 fs/kernfs/file.c:343 #3: ffff888057654c38 (kn->active#81){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:80 [inline] #3: ffff888057654c38 (kn->active#81){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x232/0x540 fs/kernfs/file.c:344 #4: ffff8880258ad358 (&q->rq_qos_mutex){+.+.}-{4:4}, at: blkg_conf_open_bdev+0x2b0/0x3c0 block/blk-cgroup.c:802 #5: ffff8880258ad120 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_mq_freeze_queue include/linux/blk-mq.h:956 [inline] #5: ffff8880258ad120 (&q->q_usage_counter(io)#17){++++}-{0:0}, at: blk_throtl_init+0x279/0x410 block/blk-throttle.c:1323 #6: ffff8880258ad158 (&q->q_usage_counter(queue)){+.+.}-{0:0}, at: blk_mq_freeze_queue include/linux/blk-mq.h:956 [inline] #6: ffff8880258ad158 (&q->q_usage_counter(queue)){+.+.}-{0:0}, at: blk_throtl_init+0x279/0x410 block/blk-throttle.c:1323 stack backtrace: CPU: 1 UID: 0 PID: 18388 Comm: syz.0.4363 Tainted: G L syzkaller #0 PREEMPT_{RT,(full)} Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/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+0xf0/0x2e0 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/rtmutex_api.c:533 [inline] _mutex_lock_killable+0x63/0x1d0 kernel/locking/rtmutex_api.c:573 pcpu_alloc_noprof+0x202/0x1950 mm/percpu.c:1788 __percpu_counter_init_many+0x43/0x370 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:1632 blk_throtl_init+0x2f6/0x410 block/blk-throttle.c:1330 tg_set_conf+0x1d6/0x4c0 block/blk-throttle.c:1359 cgroup_file_write+0x36f/0x790 kernel/cgroup/cgroup.c:4311 kernfs_fop_write_iter+0x3b0/0x540 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x629/0xba0 fs/read_write.c:688 ksys_write+0x156/0x270 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd8fd23c819 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:00007fd8fb48e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fd8fd4b5fa0 RCX: 00007fd8fd23c819 RDX: 000000000000006a RSI: 00002000000000c0 RDI: 0000000000000007 RBP: 00007fd8fb48e090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fd8fd4b6038 R14: 00007fd8fd4b5fa0 R15: 00007fff9a044d08