====================================================== WARNING: possible circular locking dependency detected 6.0.0-rc6-syzkaller-00030-g06f7db949993 #0 Not tainted ------------------------------------------------------ syz-executor778/3789 is trying to acquire lock: ffff88801755f0a8 ((&sq->pending_timer)){+.-.}-{0:0}, at: del_timer_sync+0x33/0x1b0 kernel/time/timer.c:1416 but task is already holding lock: ffffffff91345550 (&blkcg->lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] ffffffff91345550 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy block/blk-cgroup.c:1519 [inline] ffffffff91345550 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy+0x181/0x470 block/blk-cgroup.c:1501 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:349 [inline] blkg_create+0x461/0x1020 block/blk-cgroup.c:344 blkcg_init_queue+0xb2/0x620 block/blk-cgroup.c:1285 __alloc_disk_node+0x29d/0x650 block/genhd.c:1366 __blk_mq_alloc_disk+0x13b/0x1f0 block/blk-mq.c:3942 floppy_alloc_disk+0x3d/0x390 drivers/block/floppy.c:4514 do_floppy_init drivers/block/floppy.c:4595 [inline] floppy_async_init+0x316/0x21ca drivers/block/floppy.c:4765 async_run_entry_fn+0x98/0x530 kernel/async.c:127 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 -> #1 (&q->queue_lock){..-.}-{2:2}: __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] _raw_spin_lock_irq+0x32/0x50 kernel/locking/spinlock.c:170 spin_lock_irq include/linux/spinlock.h:374 [inline] throtl_pending_timer_fn+0xf7/0x1690 block/blk-throttle.c:1152 call_timer_fn+0x1a0/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x674/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x1d3/0x9c6 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 __sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:519 console_emit_next_record.constprop.0+0x4fb/0x840 arch/x86/include/asm/irqflags.h:45 console_flush_all kernel/printk/printk.c:2794 [inline] console_unlock+0x37a/0x5a0 kernel/printk/printk.c:2861 vprintk_emit+0x1b9/0x5f0 kernel/printk/printk.c:2271 vprintk+0x80/0x90 kernel/printk/printk_safe.c:50 _printk+0xba/0xed kernel/printk/printk.c:2292 batadv_check_known_mac_addr.cold+0x17/0x28 net/batman-adv/hard-interface.c:524 batadv_hard_if_event+0x554/0x1400 net/batman-adv/hard-interface.c:976 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1945 call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers net/core/dev.c:1997 [inline] dev_set_mac_address+0x2d3/0x3d0 net/core/dev.c:8816 dev_set_mac_address_user+0x2d/0x50 net/core/dev.c:8830 do_setlink+0x18c4/0x3bb0 net/core/rtnetlink.c:2735 __rtnl_newlink+0xd6a/0x17e0 net/core/rtnetlink.c:3546 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3593 rtnetlink_rcv_msg+0x43a/0xca0 net/core/rtnetlink.c:6090 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2501 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 __sys_sendto+0x236/0x340 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #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:3829 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 del_timer_sync+0x5b/0x1b0 kernel/time/timer.c:1417 throtl_pd_free+0x15/0x40 block/blk-throttle.c:500 blkcg_deactivate_policy block/blk-cgroup.c:1523 [inline] blkcg_deactivate_policy+0x26c/0x470 block/blk-cgroup.c:1501 blk_throtl_exit+0x8a/0x1a0 block/blk-throttle.c:2337 blkcg_init_queue+0x19b/0x620 block/blk-cgroup.c:1304 __alloc_disk_node+0x29d/0x650 block/genhd.c:1366 __blk_mq_alloc_disk+0x13b/0x1f0 block/blk-mq.c:3942 loop_add+0x3e2/0xaf0 drivers/block/loop.c:1983 loop_control_ioctl+0x133/0x620 drivers/block/loop.c:2155 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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-executor778/3789: #0: ffff88807ea9a8c8 (&q->queue_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:374 [inline] #0: ffff88807ea9a8c8 (&q->queue_lock){..-.}-{2:2}, at: blkcg_deactivate_policy block/blk-cgroup.c:1512 [inline] #0: ffff88807ea9a8c8 (&q->queue_lock){..-.}-{2:2}, at: blkcg_deactivate_policy+0x9b/0x470 block/blk-cgroup.c:1501 #1: ffffffff91345550 (&blkcg->lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] #1: ffffffff91345550 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy block/blk-cgroup.c:1519 [inline] #1: ffffffff91345550 (&blkcg->lock){....}-{2:2}, at: blkcg_deactivate_policy+0x181/0x470 block/blk-cgroup.c:1501 stack backtrace: CPU: 1 PID: 3789 Comm: syz-executor778 Not tainted 6.0.0-rc6-syzkaller-00030-g06f7db949993 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3829 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 del_timer_sync+0x5b/0x1b0 kernel/time/timer.c:1417 throtl_pd_free+0x15/0x40 block/blk-throttle.c:500 blkcg_deactivate_policy block/blk-cgroup.c:1523 [inline] blkcg_deactivate_policy+0x26c/0x470 block/blk-cgroup.c:1501 blk_throtl_exit+0x8a/0x1a0 block/blk-throttle.c:2337 blkcg_init_queue+0x19b/0x620 block/blk-cgroup.c:1304 __alloc_disk_node+0x29d/0x650 block/genhd.c:1366 __blk_mq_alloc_disk+0x13b/0x1f0 block/blk-mq.c:3942 loop_add+0x3e2/0xaf0 drivers/block/loop.c:1983 loop_control_ioctl+0x133/0x620 drivers/block/loop.c:2155 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7faf2113af39 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 18 00 00 90 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff3f40c8d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007faf2113af39 RDX: 0000000000000000 RSI: 0000000000004c80 RDI: 0000000000000003 RBP: 00007fff3f40c8e0 R08: 0000000000000002 R09: 0000000000003337 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007fff3f40c940 R14: 00007fff3f40c980 R15: 000000000000000e