================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz.1.40/6034 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff8880578f3c68 (slock-AF_PHONET/1){+.?.}-{3:3}, at: __sk_receive_skb+0x37d/0xa00 net/core/sock.c:563 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:382 __sk_receive_skb+0x37d/0xa00 net/core/sock.c:563 sk_receive_skb include/net/sock.h:2022 [inline] pep_do_rcv+0x3eb/0x1e60 net/phonet/pep.c:675 sk_backlog_rcv include/net/sock.h:1190 [inline] __release_sock+0x3a2/0x440 net/core/sock.c:3216 release_sock+0x1e5/0x280 net/core/sock.c:3815 pep_sock_accept+0x33b/0x13e0 net/phonet/pep.c:879 pn_socket_accept+0xd8/0x420 net/phonet/socket.c:309 do_accept+0x340/0x530 net/socket.c:2047 __sys_accept4_file net/socket.c:2081 [inline] __sys_accept4+0x108/0x200 net/socket.c:2103 __do_sys_accept net/socket.c:2116 [inline] __se_sys_accept net/socket.c:2113 [inline] __x64_sys_accept+0x74/0xb0 net/socket.c:2113 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 1122 hardirqs last enabled at (1122): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:187 [inline] hardirqs last enabled at (1122): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:206 hardirqs last disabled at (1121): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:140 [inline] hardirqs last disabled at (1121): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:174 softirqs last enabled at (1116): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last enabled at (1116): [] netif_rx+0x65/0xb0 net/core/dev.c:5770 softirqs last disabled at (1117): [] do_softirq kernel/softirq.c:523 [inline] softirqs last disabled at (1117): [] do_softirq+0xac/0xe0 kernel/softirq.c:510 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(slock-AF_PHONET/1); lock(slock-AF_PHONET/1); *** DEADLOCK *** 5 locks held by syz.1.40/6034: #0: ffff888056c1a040 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1029 [inline] #0: ffff888056c1a040 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: __sock_release+0x86/0x260 net/socket.c:721 #1: ffff8880578f4360 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1713 [inline] #1: ffff8880578f4360 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: pep_sock_close+0x92/0x4c0 net/phonet/pep.c:742 #2: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: local_lock_release include/linux/local_lock_internal.h:62 [inline] #2: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: process_backlog+0x32a/0x1580 net/core/dev.c:6664 #3: ffff8880578f4968 (slock-AF_PHONET){+.-.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] #3: ffff8880578f4968 (slock-AF_PHONET){+.-.}-{3:3}, at: __sk_receive_skb+0x1d3/0xa00 net/core/sock.c:565 #4: ffff8880578f49e0 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: sk_receive_skb include/net/sock.h:2022 [inline] #4: ffff8880578f49e0 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: phonet_rcv+0x84c/0x17f0 net/phonet/af_phonet.c:408 stack backtrace: CPU: 0 UID: 0 PID: 6034 Comm: syz.1.40 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+0x103a/0x2630 kernel/locking/lockdep.c:5191 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:382 __sk_receive_skb+0x37d/0xa00 net/core/sock.c:563 sk_receive_skb include/net/sock.h:2022 [inline] pep_do_rcv+0x3eb/0x1e60 net/phonet/pep.c:675 sk_backlog_rcv include/net/sock.h:1190 [inline] __sk_receive_skb+0x905/0xa00 net/core/sock.c:572 sk_receive_skb include/net/sock.h:2022 [inline] phonet_rcv+0x84c/0x17f0 net/phonet/af_phonet.c:408 __netif_receive_skb_one_core+0x1b2/0x1e0 net/core/dev.c:6202 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6315 process_backlog+0x37a/0x1580 net/core/dev.c:6666 __napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:7733 napi_poll net/core/dev.c:7796 [inline] net_rx_action+0xa40/0xf20 net/core/dev.c:7953 handle_softirqs+0x1ea/0xa00 kernel/softirq.c:622 do_softirq kernel/softirq.c:523 [inline] do_softirq+0xac/0xe0 kernel/softirq.c:510 __local_bh_enable_ip+0xf8/0x120 kernel/softirq.c:450 local_bh_enable include/linux/bottom_half.h:33 [inline] netif_rx net/core/dev.c:5775 [inline] netif_rx+0x93/0xb0 net/core/dev.c:5764 pn_send+0x6fa/0x8e0 net/phonet/af_phonet.c:188 pn_skb_send+0x29b/0x650 net/phonet/af_phonet.c:275 pipe_handler_request+0x1af/0x220 net/phonet/pep.c:144 pep_sock_close+0x145/0x4c0 net/phonet/pep.c:748 pn_socket_release+0x82/0xb0 net/phonet/socket.c:34 __sock_release+0xb3/0x260 net/socket.c:722 sock_close+0x1c/0x30 net/socket.c:1514 __fput+0x3ff/0xb50 fs/file_table.c:510 task_work_run+0x150/0x240 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x951/0x2af0 kernel/exit.c:976 do_group_exit+0xd5/0x2a0 kernel/exit.c:1119 get_signal+0x20ff/0x2210 kernel/signal.c:3037 arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop kernel/entry/common.c:98 [inline] __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:244 [inline] irqentry_exit_to_user_mode include/linux/irq-entry-common.h:315 [inline] irqentry_exit+0x410/0x7e0 kernel/entry/common.c:162 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0033:0x7f92ac04b180 Code: Unable to access opcode bytes at 0x7f92ac04b156. RSP: 002b:00007f92ad0aa9f8 EFLAGS: 00000206 RAX: 00007f92ad0ab010 RBX: 00007f92ad0aaf30 RCX: 0000000000000000 RDX: 00007f92ad0aaff0 RSI: 0000000000000025 RDI: 00007f92ac24f0d7 RBP: 00007f92ad08c000 R08: 00007f92ad0ab0f3 R09: 00007fff6230c167 R10: 0000000000000008 R11: 0000000000000202 R12: 00007f92ad0ab0d0 R13: 0000000000000000 R14: 00007f92ac24f0d7 R15: 00007f92ad0aaff0