====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.1.3069/16624 is trying to acquire lock: ffffffff8ee90400 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:316 [inline] ffffffff8ee90400 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook mm/slub.c:4636 [inline] ffffffff8ee90400 (fs_reclaim){+.+.}-{0:0}, at: slab_alloc_node mm/slub.c:4974 [inline] ffffffff8ee90400 (fs_reclaim){+.+.}-{0:0}, at: kmem_cache_alloc_noprof+0x5f/0x600 mm/slub.c:5010 but task is already holding lock: ffff8880270cc510 (&q->blkcg_mutex){+.+.}-{4:4}, at: blkg_conf_prep+0xa3/0xd80 block/blk-cgroup.c:849 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&q->blkcg_mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 blkcg_activate_policy+0x1cb/0x8e0 block/blk-cgroup.c:1608 blk_throtl_init+0x2f7/0x420 block/blk-throttle.c:1339 tg_set_conf+0x1db/0x4e0 block/blk-throttle.c:1368 cgroup_file_write+0x331/0x8f0 kernel/cgroup/cgroup.c:4412 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x612/0xba0 fs/read_write.c:687 ksys_write+0x150/0x270 fs/read_write.c:739 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x27a/0x6a0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #1 (&q->q_usage_counter(io)#71){++++}-{0:0}: blk_alloc_queue+0x544/0x690 block/blk-core.c:504 blk_mq_alloc_queue block/blk-mq.c:4420 [inline] __blk_mq_alloc_disk+0x194/0x390 block/blk-mq.c:4467 loop_add+0x480/0xb40 drivers/block/loop.c:2073 loop_control_ioctl+0x12b/0x5a0 drivers/block/loop.c:2243 __do_compat_sys_ioctl fs/ioctl.c:695 [inline] __se_compat_sys_ioctl fs/ioctl.c:638 [inline] __ia32_compat_sys_ioctl+0x5ea/0x950 fs/ioctl.c:638 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x27a/0x6a0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #0 (fs_reclaim){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 __fs_reclaim_acquire mm/page_alloc.c:4375 [inline] fs_reclaim_acquire+0x71/0x100 mm/page_alloc.c:4389 might_alloc include/linux/sched/mm.h:316 [inline] slab_pre_alloc_hook mm/slub.c:4636 [inline] slab_alloc_node mm/slub.c:4974 [inline] kmem_cache_alloc_noprof+0x5f/0x600 mm/slub.c:5010 __radix_tree_preload+0x2df/0x870 lib/radix-tree.c:338 blkg_conf_prep+0x621/0xd80 block/blk-cgroup.c:885 tg_set_conf+0x20b/0x4e0 block/blk-throttle.c:1373 cgroup_file_write+0x331/0x8f0 kernel/cgroup/cgroup.c:4412 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x612/0xba0 fs/read_write.c:687 ksys_write+0x150/0x270 fs/read_write.c:739 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x27a/0x6a0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e other info that might help us debug this: Chain exists of: fs_reclaim --> &q->q_usage_counter(io)#71 --> &q->blkcg_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&q->blkcg_mutex); lock(&q->q_usage_counter(io)#71); lock(&q->blkcg_mutex); lock(fs_reclaim); *** DEADLOCK *** locks held by syz.1.3069/16624: 6, last CPU#0: #0: ffff8880341dd7b0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x246/0x320 fs/file.c:1259 #1: ffff8880367ca460 (sb_writers#10){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2753 [inline] #1: ffff8880367ca460 (sb_writers#10){.+.+}-{0:0}, at: vfs_write+0x22b/0xba0 fs/read_write.c:683 #2: ffff888031e94c80 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1d8/0x540 fs/kernfs/file.c:336 #3: ffff8880749a0878 (kn->active#96){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:73 [inline] #3: ffff8880749a0878 (kn->active#96){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22b/0x540 fs/kernfs/file.c:337 #4: ffff8880270cc390 (&q->rq_qos_mutex){+.+.}-{4:4}, at: blkg_conf_open_bdev+0x2a8/0x3c0 block/blk-cgroup.c:806 #5: ffff8880270cc510 (&q->blkcg_mutex){+.+.}-{4:4}, at: blkg_conf_prep+0xa3/0xd80 block/blk-cgroup.c:849 stack backtrace: CPU: 0 UID: 0 PID: 16624 Comm: syz.1.3069 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219 check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 __fs_reclaim_acquire mm/page_alloc.c:4375 [inline] fs_reclaim_acquire+0x71/0x100 mm/page_alloc.c:4389 might_alloc include/linux/sched/mm.h:316 [inline] slab_pre_alloc_hook mm/slub.c:4636 [inline] slab_alloc_node mm/slub.c:4974 [inline] kmem_cache_alloc_noprof+0x5f/0x600 mm/slub.c:5010 __radix_tree_preload+0x2df/0x870 lib/radix-tree.c:338 blkg_conf_prep+0x621/0xd80 block/blk-cgroup.c:885 tg_set_conf+0x20b/0x4e0 block/blk-throttle.c:1373 cgroup_file_write+0x331/0x8f0 kernel/cgroup/cgroup.c:4412 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x612/0xba0 fs/read_write.c:687 ksys_write+0x150/0x270 fs/read_write.c:739 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x27a/0x6a0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf6fff0ec 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:00000000f53ed50c EFLAGS: 00000206 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000006 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