====================================================== WARNING: possible circular locking dependency detected 4.19.139-syzkaller #0 Not tainted ------------------------------------------------------ systemd-udevd/18969 is trying to acquire lock: 0000000007a22236 (&qdisc_tx_lock){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000007a22236 (&qdisc_tx_lock){+.-.}, at: red_adaptative_timer+0x92/0x5c0 net/sched/sch_red.c:265 but task is already holding lock: 00000000096ca4d1 ((&q->adapt_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] 00000000096ca4d1 ((&q->adapt_timer)){+.-.}, at: call_timer_fn+0xc9/0x700 kernel/time/timer.c:1328 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 ((&q->adapt_timer)){+.-.}: red_destroy+0x15/0x60 net/sched/sch_red.c:182 qdisc_destroy+0x180/0x780 net/sched/sch_generic.c:983 red_change+0x514/0x1080 net/sched/sch_red.c:236 qdisc_change net/sched/sch_api.c:1239 [inline] tc_modify_qdisc+0xf6a/0x1a80 net/sched/sch_api.c:1542 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4778 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2455 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:632 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2115 __sys_sendmsg net/socket.c:2153 [inline] __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2160 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&qdisc_tx_lock){+.-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] red_adaptative_timer+0x92/0x5c0 net/sched/sch_red.c:265 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1703 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1716 __do_softirq+0x26c/0x9a0 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 unwind_next_frame+0x15/0x1c60 arch/x86/kernel/unwind_orc.c:404 __save_stack_trace+0x9f/0x190 arch/x86/kernel/stacktrace.c:44 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 proc_reg_open+0x18c/0x5b0 fs/proc/inode.c:359 do_dentry_open+0x4aa/0x1160 fs/open.c:796 do_last fs/namei.c:3421 [inline] path_openat+0x793/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((&q->adapt_timer)); lock(&qdisc_tx_lock); lock((&q->adapt_timer)); lock(&qdisc_tx_lock); *** DEADLOCK *** 1 lock held by systemd-udevd/18969: #0: 00000000096ca4d1 ((&q->adapt_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #0: 00000000096ca4d1 ((&q->adapt_timer)){+.-.}, at: call_timer_fn+0xc9/0x700 kernel/time/timer.c:1328 stack backtrace: CPU: 0 PID: 18969 Comm: systemd-udevd Not tainted 4.19.139-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1865 [inline] check_prevs_add kernel/locking/lockdep.c:1978 [inline] validate_chain kernel/locking/lockdep.c:2419 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3415 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] red_adaptative_timer+0x92/0x5c0 net/sched/sch_red.c:265 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1703 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1716 __do_softirq+0x26c/0x9a0 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:unwind_next_frame+0x15/0x1c60 arch/x86/kernel/unwind_orc.c:404 Code: 4b ff ff ff e8 3c a9 0e 00 66 90 66 2e 0f 1f 84 00 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 41 57 49 89 ff 41 56 41 55 41 54 <55> 53 48 81 ec a0 00 00 00 48 c7 44 24 40 b3 8a b5 41 48 8d 5c 24 RSP: 0018:ffff88820187f690 EFLAGS: 00000283 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: ffffffff81a8de1a RCX: 0000000000000003 RDX: ffff88820187f778 RSI: ffff88820187f570 RDI: ffff88820187f6c8 RBP: ffff88820187f748 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000066061 R11: 0000000000000001 R12: ffff88820187f760 R13: 0000000000000000 R14: ffff8880aa00a540 R15: ffff88820187f6c8 __save_stack_trace+0x9f/0x190 arch/x86/kernel/stacktrace.c:44 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 proc_reg_open+0x18c/0x5b0 fs/proc/inode.c:359 do_dentry_open+0x4aa/0x1160 fs/open.c:796 do_last fs/namei.c:3421 [inline] path_openat+0x793/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f0c331cb6f0 Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 19 30 2c 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe 9d 01 00 48 89 04 24 RSP: 002b:00007ffe3e1f9948 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 000055a773f484f0 RCX: 00007f0c331cb6f0 RDX: 00000000000001b6 RSI: 0000000000080000 RDI: 000055a772df0f4c RBP: 0000000000000008 R08: 0000000000000008 R09: 0000000000000001 R10: 0000000000080000 R11: 0000000000000246 R12: 000055a772df068a R13: 0000000000000001 R14: 0000000000000000 R15: 000055a773f34910