======================================================
WARNING: possible circular locking dependency detected
4.20.0+ #7 Not tainted
------------------------------------------------------
udevd/3864 is trying to acquire lock:
0000000002ea69cb (nr_list_lock){+.-.}, at: spin_lock_bh include/linux/spinlock.h:334 [inline]
0000000002ea69cb (nr_list_lock){+.-.}, at: nr_remove_socket net/netrom/af_netrom.c:96 [inline]
0000000002ea69cb (nr_list_lock){+.-.}, at: nr_destroy_socket+0x96/0x6e0 net/netrom/af_netrom.c:264
but task is already holding lock:
000000003eacca9f (slock-AF_NETROM){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline]
000000003eacca9f (slock-AF_NETROM){+.-.}, at: nr_destroy_timer+0x32/0x90 net/netrom/af_netrom.c:247
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (slock-AF_NETROM){+.-.}:
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144
spin_lock include/linux/spinlock.h:329 [inline]
nr_find_listener net/netrom/af_netrom.c:156 [inline]
nr_rx_frame+0x60c/0x1d50 net/netrom/af_netrom.c:955
nr_loopback_timer+0x7b/0x170 net/netrom/nr_loopback.c:62
call_timer_fn+0x254/0x900 kernel/time/timer.c:1325
expire_timers kernel/time/timer.c:1362 [inline]
__run_timers+0x6fc/0xd50 kernel/time/timer.c:1681
run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1694
__do_softirq+0x30b/0xb11 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807
arch_local_irq_restore arch/x86/include/asm/paravirt.h:766 [inline]
lock_acquire+0x259/0x570 kernel/locking/lockdep.c:3844
__mutex_lock_common kernel/locking/mutex.c:925 [inline]
__mutex_lock+0x12f/0x1670 kernel/locking/mutex.c:1072
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087
ep_scan_ready_list+0xcc1/0x1010 fs/eventpoll.c:690
ep_send_events fs/eventpoll.c:1713 [inline]
ep_poll+0x58d/0x1490 fs/eventpoll.c:1840
do_epoll_wait+0x1b3/0x200 fs/eventpoll.c:2198
__do_sys_epoll_wait fs/eventpoll.c:2208 [inline]
__se_sys_epoll_wait fs/eventpoll.c:2205 [inline]
__x64_sys_epoll_wait+0x97/0xf0 fs/eventpoll.c:2205
do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
-> #0 (nr_list_lock){+.-.}:
lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x33/0x50 kernel/locking/spinlock.c:168
spin_lock_bh include/linux/spinlock.h:334 [inline]
nr_remove_socket net/netrom/af_netrom.c:96 [inline]
nr_destroy_socket+0x96/0x6e0 net/netrom/af_netrom.c:264
nr_destroy_timer+0x42/0x90 net/netrom/af_netrom.c:249
call_timer_fn+0x254/0x900 kernel/time/timer.c:1325
expire_timers kernel/time/timer.c:1362 [inline]
__run_timers+0x6fc/0xd50 kernel/time/timer.c:1681
run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1694
__do_softirq+0x30b/0xb11 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807
arch_local_irq_enable arch/x86/include/asm/paravirt.h:776 [inline]
__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline]
_raw_spin_unlock_irq+0x54/0x90 kernel/locking/spinlock.c:192
spin_unlock_irq include/linux/spinlock.h:379 [inline]
ep_scan_ready_list+0xb5b/0x1010 fs/eventpoll.c:752
ep_send_events fs/eventpoll.c:1713 [inline]
ep_poll+0x58d/0x1490 fs/eventpoll.c:1840
do_epoll_wait+0x1b3/0x200 fs/eventpoll.c:2198
__do_sys_epoll_wait fs/eventpoll.c:2208 [inline]
__se_sys_epoll_wait fs/eventpoll.c:2205 [inline]
__x64_sys_epoll_wait+0x97/0xf0 fs/eventpoll.c:2205
do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(slock-AF_NETROM);
lock(nr_list_lock);
lock(slock-AF_NETROM);
lock(nr_list_lock);
*** DEADLOCK ***
3 locks held by udevd/3864:
#0: 00000000068333f2 (&ep->mtx){+.+.}, at: ep_scan_ready_list+0xcc1/0x1010 fs/eventpoll.c:690
#1: 00000000885d0e8a ((&sk->sk_timer)#2){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:171 [inline]
#1: 00000000885d0e8a ((&sk->sk_timer)#2){+.-.}, at: call_timer_fn+0x1b4/0x900 kernel/time/timer.c:1315
#2: 000000003eacca9f (slock-AF_NETROM){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline]
#2: 000000003eacca9f (slock-AF_NETROM){+.-.}, at: nr_destroy_timer+0x32/0x90 net/netrom/af_netrom.c:247
stack backtrace:
CPU: 1 PID: 3864 Comm: udevd Not tainted 4.20.0+ #7
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+0x1db/0x2d0 lib/dump_stack.c:113
print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1224
check_prev_add kernel/locking/lockdep.c:1866 [inline]
check_prevs_add kernel/locking/lockdep.c:1979 [inline]
validate_chain kernel/locking/lockdep.c:2350 [inline]
__lock_acquire+0x3014/0x4a30 kernel/locking/lockdep.c:3338
lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x33/0x50 kernel/locking/spinlock.c:168
spin_lock_bh include/linux/spinlock.h:334 [inline]
nr_remove_socket net/netrom/af_netrom.c:96 [inline]
nr_destroy_socket+0x96/0x6e0 net/netrom/af_netrom.c:264
nr_destroy_timer+0x42/0x90 net/netrom/af_netrom.c:249
call_timer_fn+0x254/0x900 kernel/time/timer.c:1325
expire_timers kernel/time/timer.c:1362 [inline]
__run_timers+0x6fc/0xd50 kernel/time/timer.c:1681
run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1694
__do_softirq+0x30b/0xb11 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x54/0x90 kernel/locking/spinlock.c:192
Code: c0 40 4f 92 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 33 48 83 3d d5 0c 9f 01 00 74 20 fb 66 0f 1f 44 00 00 01 00 00 00 e8 b2 79 64 f9 65 8b 05 4b ab 0e 78 85 c0 74 06 41
RSP: 0018:ffff88809796f8f0 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff13249e8 RBX: 1ffff11012f2df4d RCX: 1ffff11012f2c954
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffff888097964a7c
RBP: ffff88809796f8f8 R08: 0000000000000006 R09: ffff888097964aa0
R10: ffff888097964200 R11: 0000000000000000 R12: ffff888097e283c0
R13: ffff888097e28440 R14: ffff888097e28440 R15: ffff888097e283c0
spin_unlock_irq include/linux/spinlock.h:379 [inline]
ep_scan_ready_list+0xb5b/0x1010 fs/eventpoll.c:752
ep_send_events fs/eventpoll.c:1713 [inline]
ep_poll+0x58d/0x1490 fs/eventpoll.c:1840
do_epoll_wait+0x1b3/0x200 fs/eventpoll.c:2198
__do_sys_epoll_wait fs/eventpoll.c:2208 [inline]
__se_sys_epoll_wait fs/eventpoll.c:2205 [inline]
__x64_sys_epoll_wait+0x97/0xf0 fs/eventpoll.c:2205
do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f3fc498c943
Code: 00 31 d2 48 29 c2 64 89 11 48 83 c8 ff eb ea 90 90 90 90 90 90 90 90 83 3d b5 dc 2a 00 00 75 13 49 89 ca b8 e8 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 3b c4 00 00 48 89 04 24
RSP: 002b:00007ffdf957aef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e8
RAX: ffffffffffffffda RBX: 0000000000000bb8 RCX: 00007f3fc498c943
RDX: 0000000000000008 RSI: 00007ffdf957aff0 RDI: 000000000000000a
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000bb8 R11: 0000000000000246 R12: 0000000000000003
R13: 0000000000000000 R14: 0000000000d1e3e0 R15: 0000000000cff250
kobject: 'loop4' (00000000ca804937): kobject_uevent_env
PM: Marking nosave pages: [mem 0x00000000-0x00000fff]
kobject: 'loop4' (00000000ca804937): fill_kobj_path: path = '/devices/virtual/block/loop4'
PM: Marking nosave pages: [mem 0x0009f000-0x000fffff]
PM: Marking nosave pages: [mem 0xbfffd000-0xffffffff]
PM: Basic memory bitmaps created
kobject: 'loop4' (00000000ca804937): kobject_uevent_env
kobject: 'loop4' (00000000ca804937): fill_kobj_path: path = '/devices/virtual/block/loop4'
PM: Basic memory bitmaps freed
kobject: 'loop5' (00000000d959c32c): kobject_uevent_env
kobject: 'loop5' (00000000d959c32c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop5' (00000000d959c32c): kobject_uevent_env
kobject: 'loop5' (00000000d959c32c): fill_kobj_path: path = '/devices/virtual/block/loop5'
TCP: request_sock_TCPv6: Possible SYN flooding on port 2. Sending cookies. Check SNMP counters.
kobject: 'loop5' (00000000d959c32c): kobject_uevent_env
kobject: 'loop5' (00000000d959c32c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop4' (00000000ca804937): kobject_uevent_env
kobject: 'loop4' (00000000ca804937): fill_kobj_path: path = '/devices/virtual/block/loop4'
TCP: request_sock_TCPv6: Possible SYN flooding on port 2. Sending cookies. Check SNMP counters.
kobject: 'loop5' (00000000d959c32c): kobject_uevent_env
TCP: request_sock_TCPv6: Possible SYN flooding on port 2. Sending cookies. Check SNMP counters.
kobject: 'loop5' (00000000d959c32c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop5' (00000000d959c32c): kobject_uevent_env
kobject: 'loop5' (00000000d959c32c): fill_kobj_path: path = '/devices/virtual/block/loop5'
TCP: request_sock_TCPv6: Possible SYN flooding on port 2. Sending cookies. Check SNMP counters.
kobject: 'loop4' (00000000ca804937): kobject_uevent_env
kobject: 'loop4' (00000000ca804937): fill_kobj_path: path = '/devices/virtual/block/loop4'
TCP: request_sock_TCPv6: Possible SYN flooding on port 2. Sending cookies. Check SNMP counters.
kobject: 'loop5' (00000000d959c32c): kobject_uevent_env
TCP: request_sock_TCPv6: Possible SYN flooding on port 2. Sending cookies. Check SNMP counters.
kobject: 'loop5' (00000000d959c32c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop5' (00000000d959c32c): kobject_uevent_env
kobject: 'loop5' (00000000d959c32c): fill_kobj_path: path = '/devices/virtual/block/loop5'