======================================================
WARNING: possible circular locking dependency detected
4.20.0+ #7 Not tainted
------------------------------------------------------
swapper/0/0 is trying to acquire lock:
00000000e9348b87 (nr_list_lock){+.-.}, at: spin_lock_bh include/linux/spinlock.h:334 [inline]
00000000e9348b87 (nr_list_lock){+.-.}, at: nr_remove_socket net/netrom/af_netrom.c:96 [inline]
00000000e9348b87 (nr_list_lock){+.-.}, at: nr_destroy_socket+0x96/0x6e0 net/netrom/af_netrom.c:264
but task is already holding lock:
00000000a1ea9165 (slock-AF_NETROM){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline]
00000000a1ea9165 (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]
kmem_cache_free+0xab/0x260 mm/slab.c:3748
anon_vma_chain_free mm/rmap.c:135 [inline]
unlink_anon_vmas+0x3ab/0xa50 mm/rmap.c:402
free_pgtables+0x1af/0x2f0 mm/memory.c:393
exit_mmap+0x2e3/0x5d0 mm/mmap.c:3141
__mmput kernel/fork.c:1051 [inline]
mmput+0x240/0x640 kernel/fork.c:1072
exec_mmap fs/exec.c:1043 [inline]
flush_old_exec+0xb6d/0x21a0 fs/exec.c:1276
load_elf_binary+0xa76/0x53c0 fs/binfmt_elf.c:869
search_binary_handler fs/exec.c:1653 [inline]
search_binary_handler+0x17f/0x570 fs/exec.c:1631
exec_binprm fs/exec.c:1695 [inline]
__do_execve_file.isra.0+0x1452/0x2510 fs/exec.c:1819
do_execveat_common fs/exec.c:1866 [inline]
do_execve fs/exec.c:1883 [inline]
__do_sys_execve fs/exec.c:1964 [inline]
__se_sys_execve fs/exec.c:1959 [inline]
__x64_sys_execve+0x8f/0xc0 fs/exec.c:1959
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
native_safe_halt+0x2/0x10 arch/x86/include/asm/irqflags.h:57
arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:555
default_idle_call+0x36/0x90 kernel/sched/idle.c:93
cpuidle_idle_call kernel/sched/idle.c:153 [inline]
do_idle+0x386/0x5d0 kernel/sched/idle.c:262
cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:353
rest_init+0x245/0x37b init/main.c:443
arch_call_rest_init+0xe/0x1b
start_kernel+0x882/0x8bd init/main.c:741
x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470
x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:451
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243
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 ***
2 locks held by swapper/0/0:
#0: 00000000c16231ac ((&sk->sk_timer)#2){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:171 [inline]
#0: 00000000c16231ac ((&sk->sk_timer)#2){+.-.}, at: call_timer_fn+0x1b4/0x900 kernel/time/timer.c:1315
#1: 00000000a1ea9165 (slock-AF_NETROM){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline]
#1: 00000000a1ea9165 (slock-AF_NETROM){+.-.}, at: nr_destroy_timer+0x32/0x90 net/netrom/af_netrom.c:247
stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 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:native_safe_halt+0x2/0x10 arch/x86/include/asm/irqflags.h:58
Code: ff ff ff 48 89 c7 48 89 45 d8 e8 c9 3d d2 f9 48 8b 45 d8 e9 ce fe ff ff 48 89 df e8 b8 3d d2 f9 eb 82 90 90 90 90 90 90 fb f4 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 f4 c3 90 90 90 90 90 90
RSP: 0018:ffffffff89807c60 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff13249e9 RBX: 1ffffffff1300f8f RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffffffff8987b73c
RBP: ffffffff89807d20 R08: ffffffff8987aec0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffffffff89807cf8 R14: 0000000000000000 R15: ffffffff89924f38
arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:555
default_idle_call+0x36/0x90 kernel/sched/idle.c:93
cpuidle_idle_call kernel/sched/idle.c:153 [inline]
do_idle+0x386/0x5d0 kernel/sched/idle.c:262
cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:353
rest_init+0x245/0x37b init/main.c:443
arch_call_rest_init+0xe/0x1b
start_kernel+0x882/0x8bd init/main.c:741
x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470
x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:451
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
SELinux: unrecognized netlink message: protocol=6 nlmsg_type=8704 sclass=netlink_xfrm_socket pig=25086 comm=syz-executor3
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop1' (00000000ad8c2aee): kobject_uevent_env
kobject: 'loop1' (00000000ad8c2aee): fill_kobj_path: path = '/devices/virtual/block/loop1'
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
kobject: 'loop3' (00000000ae337ee9): kobject_uevent_env
kobject: 'loop3' (00000000ae337ee9): fill_kobj_path: path = '/devices/virtual/block/loop3'
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop2' (00000000f371d6a0): kobject_uevent_env
kobject: 'loop2' (00000000f371d6a0): fill_kobj_path: path = '/devices/virtual/block/loop2'
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
kobject: 'loop1' (00000000ad8c2aee): kobject_uevent_env
kobject: 'loop1' (00000000ad8c2aee): fill_kobj_path: path = '/devices/virtual/block/loop1'
QAT: Invalid ioctl
QAT: Invalid ioctl
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
kobject: 'loop1' (00000000ad8c2aee): kobject_uevent_env
kobject: 'loop1' (00000000ad8c2aee): fill_kobj_path: path = '/devices/virtual/block/loop1'
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
kobject: 'loop2' (00000000f371d6a0): kobject_uevent_env
kobject: 'loop2' (00000000f371d6a0): fill_kobj_path: path = '/devices/virtual/block/loop2'
kobject: 'loop3' (00000000ae337ee9): kobject_uevent_env
kobject: 'loop3' (00000000ae337ee9): fill_kobj_path: path = '/devices/virtual/block/loop3'
kobject: 'loop1' (00000000ad8c2aee): kobject_uevent_env
kobject: 'loop1' (00000000ad8c2aee): fill_kobj_path: path = '/devices/virtual/block/loop1'
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
kobject: 'loop1' (00000000ad8c2aee): kobject_uevent_env
kobject: 'loop1' (00000000ad8c2aee): fill_kobj_path: path = '/devices/virtual/block/loop1'
kobject: 'loop1' (00000000ad8c2aee): kobject_uevent_env
audit: type=1400 audit(1546543843.524:118): avc: denied { block_suspend } for pid=25200 comm="syz-executor5" capability=36 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=capability2 permissive=1
kobject: 'loop1' (00000000ad8c2aee): fill_kobj_path: path = '/devices/virtual/block/loop1'
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop3' (00000000ae337ee9): kobject_uevent_env
kobject: 'loop3' (00000000ae337ee9): fill_kobj_path: path = '/devices/virtual/block/loop3'
kobject: 'loop2' (00000000f371d6a0): kobject_uevent_env
kobject: 'loop2' (00000000f371d6a0): fill_kobj_path: path = '/devices/virtual/block/loop2'
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop1' (00000000ad8c2aee): kobject_uevent_env
kobject: 'loop1' (00000000ad8c2aee): fill_kobj_path: path = '/devices/virtual/block/loop1'
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
Debayer B: ================= START STATUS =================
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
Debayer B: ================== END STATUS ==================
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop5' (0000000073d4768c): kobject_uevent_env
kobject: 'loop5' (0000000073d4768c): fill_kobj_path: path = '/devices/virtual/block/loop5'
kobject: 'loop1' (00000000ad8c2aee): kobject_uevent_env
kobject: 'loop1' (00000000ad8c2aee): fill_kobj_path: path = '/devices/virtual/block/loop1'
kobject: 'loop2' (00000000f371d6a0): kobject_uevent_env
kobject: 'loop2' (00000000f371d6a0): fill_kobj_path: path = '/devices/virtual/block/loop2'
kobject: 'loop3' (00000000ae337ee9): kobject_uevent_env
kobject: 'loop3' (00000000ae337ee9): fill_kobj_path: path = '/devices/virtual/block/loop3'
kobject: 'loop0' (000000002ff2e7e2): kobject_uevent_env
kobject: 'loop0' (000000002ff2e7e2): fill_kobj_path: path = '/devices/virtual/block/loop0'
kobject: 'loop2' (00000000f371d6a0): kobject_uevent_env
kobject: 'loop2' (00000000f371d6a0): fill_kobj_path: path = '/devices/virtual/block/loop2'
kobject: 'loop3' (00000000ae337ee9): kobject_uevent_env
kobject: 'loop3' (00000000ae337ee9): fill_kobj_path: path = '/devices/virtual/block/loop3'