====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.5.840/7366 is trying to acquire lock: ffff88805695b0a8 ((&sq->pending_timer)){+.-.}-{0:0}, at: __timer_delete_sync+0xc8/0x2e0 kernel/time/timer.c:1556 but task is already holding lock: ffffffff97e7f970 (&blkcg->lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffffffff97e7f970 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy+0x191/0x5c0 block/blk-cgroup.c:1526 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+0x28c/0x3f0 block/blk-cgroup.c:1283 __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+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 stack_trace_consume_entry+0xe0/0x270 kernel/stacktrace.c:93 arch_stack_walk+0x100/0x140 arch/x86/kernel/stacktrace.c:27 stack_trace_save+0xa6/0xf0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 __kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x490 mm/slab.h:737 slab_alloc_node mm/slub.c:3359 [inline] slab_alloc mm/slub.c:3367 [inline] __kmem_cache_alloc_lru mm/slub.c:3374 [inline] kmem_cache_alloc+0x18b/0x2f0 mm/slub.c:3383 kmem_cache_zalloc include/linux/slab.h:689 [inline] __kernfs_new_node+0xe1/0x7f0 fs/kernfs/dir.c:614 kernfs_new_node+0x148/0x250 fs/kernfs/dir.c:690 __kernfs_create_file+0x47/0x2e0 fs/kernfs/file.c:1068 sysfs_add_file_mode_ns+0x233/0x2f0 fs/sysfs/file.c:298 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x490/0xce0 fs/sysfs/group.c:148 internal_create_groups fs/sysfs/group.c:188 [inline] sysfs_create_groups+0x55/0x120 fs/sysfs/group.c:214 create_dir lib/kobject.c:68 [inline] kobject_add_internal+0x65e/0xca0 lib/kobject.c:231 kobject_add_varg lib/kobject.c:366 [inline] kobject_init_and_add+0x128/0x190 lib/kobject.c:449 netdev_queue_add_kobject net/core/net-sysfs.c:1664 [inline] netdev_queue_update_kobjects+0x1f9/0x480 net/core/net-sysfs.c:1716 register_queue_kobjects net/core/net-sysfs.c:1777 [inline] netdev_register_kobject+0x273/0x320 net/core/net-sysfs.c:2017 register_netdevice+0x133a/0x1b80 net/core/dev.c:10244 veth_newlink+0x66a/0xd60 drivers/net/veth.c:1741 rtnl_newlink_create net/core/rtnetlink.c:3436 [inline] __rtnl_newlink net/core/rtnetlink.c:3656 [inline] rtnl_newlink+0x14b3/0x1f90 net/core/rtnetlink.c:3669 rtnetlink_rcv_msg+0x863/0xfb0 net/core/rtnetlink.c:6166 netlink_rcv_skb+0x1ef/0x440 net/netlink/af_netlink.c:2516 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x7ad/0x920 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x497/0x650 net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2161 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 -> #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/0x40 block/blk-throttle.c:493 blkcg_deactivate_policy+0x35c/0x5c0 block/blk-cgroup.c:1530 blk_throtl_exit+0xa6/0x140 block/blk-throttle.c:2415 blkcg_init_disk+0x37b/0x3f0 block/blk-cgroup.c:1307 __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.5.840/7366: #0: ffff88802844a790 (&q->queue_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #0: ffff88802844a790 (&q->queue_lock){..-.}-{2:2}, at: blkcg_deactivate_policy+0xde/0x5c0 block/blk-cgroup.c:1519 #1: ffffffff97e7f970 (&blkcg->lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffffffff97e7f970 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy+0x191/0x5c0 block/blk-cgroup.c:1526 stack backtrace: CPU: 1 PID: 7366 Comm: syz.5.840 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/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/0x40 block/blk-throttle.c:493 blkcg_deactivate_policy+0x35c/0x5c0 block/blk-cgroup.c:1530 blk_throtl_exit+0xa6/0x140 block/blk-throttle.c:2415 blkcg_init_disk+0x37b/0x3f0 block/blk-cgroup.c:1307 __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:0x7fe2f679f559 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:00007fe2f7665028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fe2f6a25fa0 RCX: 00007fe2f679f559 RDX: 0000200000000580 RSI: 00000000c138fd03 RDI: 0000000000000003 RBP: 00007fe2f6836b20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe2f6a26038 R14: 00007fe2f6a25fa0 R15: 00007ffe7f660408