================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. swapper/3/0 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88802f4ca260 (sk_lock-AF_X25){+.?.}-{0:0}, at: lock_sock include/net/sock.h:1713 [inline] ffff88802f4ca260 (sk_lock-AF_X25){+.?.}-{0:0}, at: x25_kill_by_neigh+0x168/0x280 net/x25/af_x25.c:1778 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825 lock_sock_nested+0x41/0xf0 net/core/sock.c:3827 lock_sock include/net/sock.h:1713 [inline] x25_bind+0x221/0x5c0 net/x25/af_x25.c:694 __sys_bind_socket net/socket.c:1920 [inline] __sys_bind_socket net/socket.c:1912 [inline] __sys_bind+0x1a9/0x260 net/socket.c:1951 __do_sys_bind net/socket.c:1956 [inline] __se_sys_bind net/socket.c:1954 [inline] __x64_sys_bind+0x72/0xb0 net/socket.c:1954 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 663670 hardirqs last enabled at (663670): [] __local_bh_enable_ip+0x9e/0x120 kernel/softirq.c:455 hardirqs last disabled at (663669): [] __local_bh_enable_ip+0xc7/0x120 kernel/softirq.c:432 softirqs last enabled at (663254): [] __do_softirq kernel/softirq.c:656 [inline] softirqs last enabled at (663254): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last enabled at (663254): [] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 softirqs last disabled at (663279): [] __do_softirq kernel/softirq.c:656 [inline] softirqs last disabled at (663279): [] invoke_softirq kernel/softirq.c:496 [inline] softirqs last disabled at (663279): [] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(sk_lock-AF_X25); lock(sk_lock-AF_X25); *** DEADLOCK *** 1 lock held by swapper/3/0: #0: ffffffff8ede8200 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline] #0: ffffffff8ede8200 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline] #0: ffffffff8ede8200 (rcu_read_lock){....}-{1:3}, at: netif_receive_skb_core+0x25/0x1a0 net/core/dev.c:6240 stack backtrace: CPU: 3 UID: 0 PID: 0 Comm: swapper/3 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_usage_bug.part.0+0x257/0x340 kernel/locking/lockdep.c:4042 print_usage_bug kernel/locking/lockdep.c:4010 [inline] valid_state kernel/locking/lockdep.c:4056 [inline] mark_lock_irq kernel/locking/lockdep.c:4267 [inline] mark_lock+0x74a/0xa20 kernel/locking/lockdep.c:4753 mark_usage kernel/locking/lockdep.c:4642 [inline] __lock_acquire+0xff3/0x1a40 kernel/locking/lockdep.c:5191 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5825 lock_sock_nested+0x41/0xf0 net/core/sock.c:3827 lock_sock include/net/sock.h:1713 [inline] x25_kill_by_neigh+0x168/0x280 net/x25/af_x25.c:1778 x25_lapb_receive_frame+0x4b1/0x1000 net/x25/x25_dev.c:138 __netif_receive_skb_one_core+0x1b2/0x1e0 net/core/dev.c:6216 netif_receive_skb_core+0x5a/0x1a0 net/core/dev.c:6241 lapbeth_napi_poll+0x42/0xc0 drivers/net/wan/lapbether.c:100 __napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:7739 napi_poll net/core/dev.c:7802 [inline] net_rx_action+0xa40/0xf20 net/core/dev.c:7959 handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:64 Code: d5 aa 02 e9 83 4b 03 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 83 0f 2f 00 fb f4 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 RSP: 0018:ffffc90000197e00 EFLAGS: 00000206 RAX: 00000000000a1eed RBX: ffff88801f2d2540 RCX: ffffffff8bbc9335 RDX: 0000000000000000 RSI: ffffffff8e3aced0 RDI: ffffffff8c600380 RBP: ffffed1003e5a4a8 R08: 0000000000000001 R09: ffffed100d4e678d R10: ffff88806a733c6b R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 1ffff92000032fc4 R15: dffffc0000000000 arch_safe_halt arch/x86/include/asm/paravirt.h:62 [inline] default_idle+0x9/0x10 arch/x86/kernel/process.c:768 default_idle_call+0x6c/0xb0 kernel/sched/idle.c:122 cpuidle_idle_call kernel/sched/idle.c:199 [inline] do_idle+0x3a7/0x5b0 kernel/sched/idle.c:355 cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:454 start_secondary+0x21d/0x2d0 arch/x86/kernel/smpboot.c:312 common_startup_64+0x13e/0x158 BUG: sleeping function called from invalid context at net/core/sock.c:3829 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/3 preempt_count: 101, expected: 0 RCU nest depth: 1, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [] alloc_from_pcs mm/slub.c:4767 [inline] [] slab_alloc_node mm/slub.c:4905 [inline] [] kmem_cache_alloc_node_noprof+0xe5/0x6b0 mm/slub.c:4989 CPU: 3 UID: 0 PID: 0 Comm: swapper/3 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 __might_resched.cold+0x1ec/0x232 kernel/sched/core.c:9197 lock_sock_nested+0x52/0xf0 net/core/sock.c:3829 lock_sock include/net/sock.h:1713 [inline] x25_kill_by_neigh+0x168/0x280 net/x25/af_x25.c:1778 x25_lapb_receive_frame+0x4b1/0x1000 net/x25/x25_dev.c:138 __netif_receive_skb_one_core+0x1b2/0x1e0 net/core/dev.c:6216 netif_receive_skb_core+0x5a/0x1a0 net/core/dev.c:6241 lapbeth_napi_poll+0x42/0xc0 drivers/net/wan/lapbether.c:100 __napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:7739 napi_poll net/core/dev.c:7802 [inline] net_rx_action+0xa40/0xf20 net/core/dev.c:7959 handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:64 Code: d5 aa 02 e9 83 4b 03 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 83 0f 2f 00 fb f4 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 RSP: 0018:ffffc90000197e00 EFLAGS: 00000206 RAX: 00000000000a1eed RBX: ffff88801f2d2540 RCX: ffffffff8bbc9335 RDX: 0000000000000000 RSI: ffffffff8e3aced0 RDI: ffffffff8c600380 RBP: ffffed1003e5a4a8 R08: 0000000000000001 R09: ffffed100d4e678d R10: ffff88806a733c6b R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 1ffff92000032fc4 R15: dffffc0000000000 arch_safe_halt arch/x86/include/asm/paravirt.h:62 [inline] default_idle+0x9/0x10 arch/x86/kernel/process.c:768 default_idle_call+0x6c/0xb0 kernel/sched/idle.c:122 cpuidle_idle_call kernel/sched/idle.c:199 [inline] do_idle+0x3a7/0x5b0 kernel/sched/idle.c:355 cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:454 start_secondary+0x21d/0x2d0 arch/x86/kernel/smpboot.c:312 common_startup_64+0x13e/0x158 ---------------- Code disassembly (best guess): 0: d5 aa 02 e9 {rex2 0xaa} lar %rcx,%rbp 4: 83 4b 03 00 orl $0x0,0x3(%rbx) 8: 0f 1f 00 nopl (%rax) b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: f3 0f 1e fa endbr64 1f: eb 07 jmp 0x28 21: 0f 00 2d 83 0f 2f 00 verw 0x2f0f83(%rip) # 0x2f0fab 28: fb sti 29: f4 hlt * 2a: c3 ret <-- trapping instruction 2b: cc int3 2c: cc int3 2d: cc int3 2e: cc int3 2f: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 36: 00 00 00 39: 66 90 xchg %ax,%ax 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop