RBP: 00007f3295a3506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3295c26038 R14: 00007f3295c25fa0 R15: 00007ffec50c77e8 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.4.672/6422 is trying to acquire lock: ffff8880792970a8 ((&sq->pending_timer)){+.-.}-{0:0}, at: __timer_delete_sync+0xc8/0x2e0 kernel/time/timer.c:1556 but task is already holding lock: ffffffff96e1ee30 (&blkcg->lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffffffff96e1ee30 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy+0x191/0x5c0 block/blk-cgroup.c:1529 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&blkcg->lock){....}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] blkg_create+0xbe9/0x13c0 block/blk-cgroup.c:322 blkcg_init_disk+0x28c/0x3f0 block/blk-cgroup.c:1286 __alloc_disk_node+0x2b3/0x570 block/genhd.c:1432 __blk_alloc_disk+0x2c/0x80 block/genhd.c:1471 brd_alloc+0x377/0x760 drivers/block/brd.c:424 brd_init+0x125/0x1a5 drivers/block/brd.c:529 do_one_initcall+0x257/0x800 init/main.c:1270 do_initcall_level+0x13d/0x1ed init/main.c:1343 do_initcalls+0x4b/0x8a init/main.c:1359 kernel_init_freeable+0x401/0x5ab init/main.c:1598 kernel_init+0x19/0x1b0 init/main.c:1486 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 -> #1 (&q->queue_lock){..-.}-{2:2}: __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] _raw_spin_lock_irq+0xab/0xf0 kernel/locking/spinlock.c:170 spin_lock_irq include/linux/spinlock.h:376 [inline] throtl_pending_timer_fn+0x10e/0x1dd0 block/blk-throttle.c:1200 call_timer_fn+0x1ac/0x670 kernel/time/timer.c:1701 expire_timers kernel/time/timer.c:1752 [inline] __run_timers+0x56c/0x810 kernel/time/timer.c:2023 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:2036 handle_softirqs+0x291/0x910 kernel/softirq.c:596 __do_softirq kernel/softirq.c:630 [inline] invoke_softirq kernel/softirq.c:470 [inline] __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:679 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 get_current arch/x86/include/asm/current.h:15 [inline] __syscall_enter_from_user_work kernel/entry/common.c:100 [inline] syscall_enter_from_user_mode+0x2a/0x80 kernel/entry/common.c:121 do_syscall_64+0x24/0xa0 arch/x86/entry/common.c:72 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 ((&sq->pending_timer)){+.-.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5678 __timer_delete_sync+0xe1/0x2e0 kernel/time/timer.c:1556 del_timer_sync include/linux/timer.h:200 [inline] throtl_pd_free+0x15/0x40 block/blk-throttle.c:493 blkcg_deactivate_policy+0x35c/0x5c0 block/blk-cgroup.c:1533 blk_throtl_exit+0xa6/0x140 block/blk-throttle.c:2415 blkcg_init_disk+0x37b/0x3f0 block/blk-cgroup.c:1310 __alloc_disk_node+0x2b3/0x570 block/genhd.c:1432 __blk_alloc_disk+0x2c/0x80 block/genhd.c:1471 alloc_dev drivers/md/dm.c:2055 [inline] dm_create+0x46b/0xf90 drivers/md/dm.c:2259 dev_create+0x12e/0x2c0 drivers/md/dm-ioctl.c:875 ctl_ioctl drivers/md/dm-ioctl.c:2055 [inline] dm_ctl_ioctl+0xa9c/0xec0 drivers/md/dm-ioctl.c:2077 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: (&sq->pending_timer) --> &q->queue_lock --> &blkcg->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&blkcg->lock); lock(&q->queue_lock); lock(&blkcg->lock); lock((&sq->pending_timer)); *** DEADLOCK *** 2 locks held by syz.4.672/6422: #0: ffff88802755d610 (&q->queue_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #0: ffff88802755d610 (&q->queue_lock){..-.}-{2:2}, at: blkcg_deactivate_policy+0xde/0x5c0 block/blk-cgroup.c:1522 #1: ffffffff96e1ee30 (&blkcg->lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffffffff96e1ee30 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy+0x191/0x5c0 block/blk-cgroup.c:1529 stack backtrace: CPU: 0 PID: 6422 Comm: syz.4.672 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5678 __timer_delete_sync+0xe1/0x2e0 kernel/time/timer.c:1556 del_timer_sync include/linux/timer.h:200 [inline] throtl_pd_free+0x15/0x40 block/blk-throttle.c:493 blkcg_deactivate_policy+0x35c/0x5c0 block/blk-cgroup.c:1533 blk_throtl_exit+0xa6/0x140 block/blk-throttle.c:2415 blkcg_init_disk+0x37b/0x3f0 block/blk-cgroup.c:1310 __alloc_disk_node+0x2b3/0x570 block/genhd.c:1432 __blk_alloc_disk+0x2c/0x80 block/genhd.c:1471 alloc_dev drivers/md/dm.c:2055 [inline] dm_create+0x46b/0xf90 drivers/md/dm.c:2259 dev_create+0x12e/0x2c0 drivers/md/dm-ioctl.c:875 ctl_ioctl drivers/md/dm-ioctl.c:2055 [inline] dm_ctl_ioctl+0xa9c/0xec0 drivers/md/dm-ioctl.c:2077 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f329599e159 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:00007f32967ff028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f3295c25fa0 RCX: 00007f329599e159 RDX: 0000200000000000 RSI: 00000000c138fd03 RDI: 0000000000000003 RBP: 00007f3295a3506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3295c26038 R14: 00007f3295c25fa0 R15: 00007ffec50c77e8