RBP: 00007f2d1be3804e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2d1c026038 R14: 00007f2d1c025fa0 R15: 00007fff00d7b908 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.5.1555/9653 is trying to acquire lock: ffff88802cced0b8 ((&sq->pending_timer)){+.-.}-{0:0}, at: __timer_delete_sync+0xc8/0x2e0 kernel/time/timer.c:1556 but task is already holding lock: ffffffff97e71790 (&blkcg->lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffffffff97e71790 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy+0x194/0x5d0 block/blk-cgroup.c:1538 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/0x1390 block/blk-cgroup.c:322 blkcg_init_disk+0x272/0x400 block/blk-cgroup.c:1293 __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:1271 do_initcall_level+0x13d/0x1ed init/main.c:1344 do_initcalls+0x4b/0x8a init/main.c:1360 kernel_init_freeable+0x401/0x5ab init/main.c:1599 kernel_init+0x19/0x1b0 init/main.c:1487 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+0x111/0x1dd0 block/blk-throttle.c:1209 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 lock_acquire+0x226/0x4a0 kernel/locking/lockdep.c:5794 rcu_lock_acquire include/linux/rcupdate.h:350 [inline] rcu_read_lock_sched include/linux/rcupdate.h:883 [inline] pfn_valid+0xe9/0x420 include/linux/mmzone.h:1857 page_table_check_clear+0x1e/0x6b0 mm/page_table_check.c:67 ptep_get_and_clear_full arch/x86/include/asm/jump_label.h:-1 [inline] zap_pte_range mm/memory.c:1433 [inline] zap_pmd_range mm/memory.c:1572 [inline] zap_pud_range mm/memory.c:1601 [inline] zap_p4d_range mm/memory.c:1622 [inline] unmap_page_range+0x1905/0x25b0 mm/memory.c:1643 unmap_vmas+0x260/0x390 mm/memory.c:1728 exit_mmap+0x20d/0x970 mm/mmap.c:3293 __mmput+0x118/0x3a0 kernel/fork.c:1214 exit_mm+0x24d/0x350 kernel/exit.c:572 do_exit+0x958/0x2570 kernel/exit.c:874 do_group_exit+0x229/0x2e0 kernel/exit.c:1030 get_signal+0x1259/0x1340 kernel/signal.c:2884 arch_do_signal_or_restart+0xc4/0x1310 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213 __syscall_exit_to_user_mode_work kernel/entry/common.c:295 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:306 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 ((&sq->pending_timer)){+.-.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790 __timer_delete_sync+0xe1/0x2e0 kernel/time/timer.c:1556 del_timer_sync include/linux/timer.h:200 [inline] throtl_pd_free+0x15/0x30 block/blk-throttle.c:504 blkcg_deactivate_policy+0x35f/0x5d0 block/blk-cgroup.c:1542 blk_throtl_exit+0xa6/0x140 block/blk-throttle.c:2424 blkcg_init_disk+0x38d/0x400 block/blk-cgroup.c:1319 __alloc_disk_node+0x2b3/0x570 block/genhd.c:1432 __blk_alloc_disk+0x2c/0x80 block/genhd.c:1471 alloc_dev drivers/md/dm.c:2057 [inline] dm_create+0x46b/0xf90 drivers/md/dm.c:2261 dev_create+0x12e/0x2c0 drivers/md/dm-ioctl.c:887 ctl_ioctl drivers/md/dm-ioctl.c:2070 [inline] dm_ctl_ioctl+0xa9c/0xec0 drivers/md/dm-ioctl.c:2092 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.5.1555/9653: #0: ffff888028a3c3e0 (&q->queue_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #0: ffff888028a3c3e0 (&q->queue_lock){..-.}-{2:2}, at: blkcg_deactivate_policy+0xe1/0x5d0 block/blk-cgroup.c:1531 #1: ffffffff97e71790 (&blkcg->lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffffffff97e71790 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy+0x194/0x5d0 block/blk-cgroup.c:1538 stack backtrace: CPU: 1 PID: 9653 Comm: syz.5.1555 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790 __timer_delete_sync+0xe1/0x2e0 kernel/time/timer.c:1556 del_timer_sync include/linux/timer.h:200 [inline] throtl_pd_free+0x15/0x30 block/blk-throttle.c:504 blkcg_deactivate_policy+0x35f/0x5d0 block/blk-cgroup.c:1542 blk_throtl_exit+0xa6/0x140 block/blk-throttle.c:2424 blkcg_init_disk+0x38d/0x400 block/blk-cgroup.c:1319 __alloc_disk_node+0x2b3/0x570 block/genhd.c:1432 __blk_alloc_disk+0x2c/0x80 block/genhd.c:1471 alloc_dev drivers/md/dm.c:2057 [inline] dm_create+0x46b/0xf90 drivers/md/dm.c:2261 dev_create+0x12e/0x2c0 drivers/md/dm-ioctl.c:887 ctl_ioctl drivers/md/dm-ioctl.c:2070 [inline] dm_ctl_ioctl+0xa9c/0xec0 drivers/md/dm-ioctl.c:2092 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:0x7f2d1bda94d9 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:00007f2d1cc44028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2d1c025fa0 RCX: 00007f2d1bda94d9 RDX: 0000200000000b00 RSI: 00000000c138fd03 RDI: 0000000000000004 RBP: 00007f2d1be3804e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2d1c026038 R14: 00007f2d1c025fa0 R15: 00007fff00d7b908