================================ WARNING: inconsistent lock state 4.20.0+ #175 Not tainted -------------------------------- kobject: 'loop4' (000000001a019791): kobject_uevent_env inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor3/5223 [HC0[0]:SC0[0]:HE1:SE1] takes: 000000001a6e5409 (slock-AF_NETROM){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 000000001a6e5409 (slock-AF_NETROM){+.?.}, at: nr_find_socket+0x113/0x160 net/netrom/af_netrom.c:177 kobject: 'loop4' (000000001a019791): fill_kobj_path: path = '/devices/virtual/block/loop4' {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3841 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2d/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+0x5f8/0x1da0 net/netrom/af_netrom.c:955 nr_loopback_timer+0x79/0x160 net/netrom/nr_loopback.c:62 call_timer_fn+0x272/0x920 kernel/time/timer.c:1325 kobject: 'loop1' (00000000a41582e2): kobject_uevent_env expire_timers kernel/time/timer.c:1362 [inline] __run_timers+0x7e5/0xc70 kernel/time/timer.c:1681 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1694 __do_softirq+0x30c/0xb2e kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1cb/0x760 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 vma_compute_subtree_gap+0x12a/0x240 mm/mmap.c:314 validate_mm_rb+0x7e/0xc0 mm/mmap.c:379 vma_rb_insert mm/mmap.c:450 [inline] __vma_link_rb+0x256/0x370 mm/mmap.c:606 dup_mmap kernel/fork.c:584 [inline] dup_mm kernel/fork.c:1324 [inline] copy_mm kernel/fork.c:1379 [inline] copy_process+0x44ac/0x8790 kernel/fork.c:1923 _do_fork+0x1cb/0x11d0 kernel/fork.c:2222 __do_sys_clone kernel/fork.c:2329 [inline] __se_sys_clone kernel/fork.c:2323 [inline] __x64_sys_clone+0xbf/0x150 kernel/fork.c:2323 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 940 hardirqs last enabled at (937): [] __local_bh_enable_ip+0x160/0x260 kernel/softirq.c:194 hardirqs last disabled at (939): [] __local_bh_enable_ip+0x120/0x260 kernel/softirq.c:171 softirqs last enabled at (940): [] spin_unlock_bh include/linux/spinlock.h:374 [inline] softirqs last enabled at (940): [] nr_find_socket+0x128/0x160 net/netrom/af_netrom.c:183 softirqs last disabled at (938): [] spin_lock_bh include/linux/spinlock.h:334 [inline] softirqs last disabled at (938): [] nr_find_socket+0x24/0x160 net/netrom/af_netrom.c:172 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(slock-AF_NETROM); lock(slock-AF_NETROM); *** DEADLOCK *** 1 lock held by syz-executor3/5223: #0: 000000001a6e5409 (slock-AF_NETROM){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] #0: 000000001a6e5409 (slock-AF_NETROM){+.?.}, at: nr_find_socket+0x113/0x160 net/netrom/af_netrom.c:177 stack backtrace: kobject: 'loop1' (00000000a41582e2): fill_kobj_path: path = '/devices/virtual/block/loop1' CPU: 1 PID: 5223 Comm: syz-executor3 Not tainted 4.20.0+ #175 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+0x1d3/0x2c6 lib/dump_stack.c:113 print_usage_bug.cold.61+0x320/0x41a kernel/locking/lockdep.c:2475 valid_state kernel/locking/lockdep.c:2488 [inline] mark_lock_irq kernel/locking/lockdep.c:2682 [inline] mark_lock+0x1114/0x1cc0 kernel/locking/lockdep.c:3062 mark_held_locks+0xc7/0x130 kernel/locking/lockdep.c:2740 __trace_hardirqs_on_caller kernel/locking/lockdep.c:2769 [inline] lockdep_hardirqs_on+0x421/0x5c0 kernel/locking/lockdep.c:2814 trace_hardirqs_on+0xbd/0x310 kernel/trace/trace_preemptirq.c:30 __local_bh_enable_ip+0x160/0x260 kernel/softirq.c:194 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline] _raw_spin_unlock_bh+0x30/0x40 kernel/locking/spinlock.c:200 spin_unlock_bh include/linux/spinlock.h:374 [inline] nr_find_socket+0x128/0x160 net/netrom/af_netrom.c:183 nr_find_next_circuit+0x71/0x90 net/netrom/af_netrom.c:225 nr_connect+0x6cb/0x1350 net/netrom/af_netrom.c:704 __sys_connect+0x37d/0x4c0 net/socket.c:1664 __do_sys_connect net/socket.c:1675 [inline] __se_sys_connect net/socket.c:1672 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1672 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457ec9 Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fbc906aec78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457ec9 RDX: 0000000000000048 RSI: 0000000020000000 RDI: 0000000000000007 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc906af6d4 R13: 00000000004be34f R14: 00000000004ce4d0 R15: 00000000ffffffff