================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz.0.41/5572 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff88804320a8e0 (slock-AF_PHONET/1){+.?.}-{3:3}, at: __sk_receive_skb+0x23c/0xa90 net/core/sock.c:570 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0xf0/0x2e0 kernel/locking/lockdep.c:5868 _raw_spin_lock_nested+0x32/0x50 kernel/locking/spinlock.c:378 __sk_receive_skb+0x23c/0xa90 net/core/sock.c:570 sk_receive_skb include/net/sock.h:2019 [inline] pep_do_rcv+0x685/0xaa0 net/phonet/pep.c:675 sk_backlog_rcv include/net/sock.h:1185 [inline] __sk_receive_skb+0xa07/0xa90 net/core/sock.c:579 sk_receive_skb include/net/sock.h:2019 [inline] phonet_rcv+0x781/0xc40 net/phonet/af_phonet.c:-1 __netif_receive_skb_one_core net/core/dev.c:6164 [inline] __netif_receive_skb net/core/dev.c:6277 [inline] process_backlog+0xc66/0x1950 net/core/dev.c:6628 __napi_poll+0xae/0x340 net/core/dev.c:7692 napi_poll net/core/dev.c:7755 [inline] net_rx_action+0x627/0xf70 net/core/dev.c:7912 handle_softirqs+0x22a/0x870 kernel/softirq.c:622 do_softirq+0x76/0xd0 kernel/softirq.c:523 __local_bh_enable_ip+0xf8/0x130 kernel/softirq.c:450 local_bh_enable include/linux/bottom_half.h:33 [inline] netif_rx+0x83/0x90 net/core/dev.c:5730 pn_send+0x62a/0x8e0 net/phonet/af_phonet.c:185 pn_skb_send+0x218/0x510 net/phonet/af_phonet.c:272 pep_indicate net/phonet/pep.c:123 [inline] pipe_handler_send_created_ind net/phonet/pep.c:155 [inline] pep_connresp_rcv net/phonet/pep.c:521 [inline] pipe_handler_do_rcv+0x165a/0x2030 net/phonet/pep.c:587 pep_do_rcv+0x5d6/0xaa0 net/phonet/pep.c:708 sk_backlog_rcv include/net/sock.h:1185 [inline] __release_sock+0x297/0x3a0 net/core/sock.c:3213 release_sock+0x5f/0x1f0 net/core/sock.c:3795 pn_socket_connect+0x713/0xba0 net/phonet/socket.c:276 __sys_connect_file net/socket.c:2089 [inline] __sys_connect+0x312/0x450 net/socket.c:2108 __do_sys_connect net/socket.c:2114 [inline] __se_sys_connect net/socket.c:2111 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2111 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 321 hardirqs last enabled at (321): [] __local_bh_enable_ip+0xd0/0x130 kernel/softirq.c:455 hardirqs last disabled at (319): [] __local_bh_enable_ip+0x71/0x130 kernel/softirq.c:432 softirqs last enabled at (320): [] spin_unlock_bh include/linux/spinlock.h:395 [inline] softirqs last enabled at (320): [] __release_sock+0xa2/0x3a0 net/core/sock.c:3206 softirqs last disabled at (318): [] spin_lock_bh include/linux/spinlock.h:347 [inline] softirqs last disabled at (318): [] release_sock+0x2f/0x1f0 net/core/sock.c:3793 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(slock-AF_PHONET/1); lock(slock-AF_PHONET/1); *** DEADLOCK *** 1 lock held by syz.0.41/5572: #0: ffff88804320b660 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1709 [inline] #0: ffff88804320b660 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: pep_sock_accept+0x111/0x1410 net/phonet/pep.c:780 stack backtrace: CPU: 0 UID: 0 PID: 5572 Comm: syz.0.41 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_lvl+0xe8/0x150 lib/dump_stack.c:120 print_usage_bug+0x28b/0x2e0 kernel/locking/lockdep.c:4042 valid_state kernel/locking/lockdep.c:4056 [inline] mark_lock_irq+0x410/0x420 kernel/locking/lockdep.c:-1 mark_lock+0x115/0x190 kernel/locking/lockdep.c:4753 mark_usage kernel/locking/lockdep.c:-1 [inline] __lock_acquire+0x9f9/0x2cf0 kernel/locking/lockdep.c:5191 lock_acquire+0xf0/0x2e0 kernel/locking/lockdep.c:5868 _raw_spin_lock_nested+0x32/0x50 kernel/locking/spinlock.c:378 __sk_receive_skb+0x23c/0xa90 net/core/sock.c:570 sk_receive_skb include/net/sock.h:2019 [inline] pep_do_rcv+0x685/0xaa0 net/phonet/pep.c:675 sk_backlog_rcv include/net/sock.h:1185 [inline] __release_sock+0x297/0x3a0 net/core/sock.c:3213 release_sock+0x5f/0x1f0 net/core/sock.c:3795 pep_sock_accept+0xed3/0x1410 net/phonet/pep.c:879 pn_socket_accept+0xc9/0x2e0 net/phonet/socket.c:303 do_accept+0x521/0x760 net/socket.c:1988 __sys_accept4_file net/socket.c:2022 [inline] __sys_accept4+0x139/0x230 net/socket.c:2044 __do_sys_accept4 net/socket.c:2051 [inline] __se_sys_accept4 net/socket.c:2048 [inline] __x64_sys_accept4+0x9a/0xb0 net/socket.c:2048 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff5b799c799 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff5b882c028 EFLAGS: 00000246 ORIG_RAX: 0000000000000120 RAX: ffffffffffffffda RBX: 00007ff5b7c15fa0 RCX: 00007ff5b799c799 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007ff5b7a32bd9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000080000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff5b7c16038 R14: 00007ff5b7c15fa0 R15: 00007ffdb86b3188