================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz.0.86/6239 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88806babbc68 (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_accept4 net/socket.c:2110 [inline] __se_sys_accept4 net/socket.c:2107 [inline] __ia32_sys_accept4+0x94/0x100 net/socket.c:2107 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe7/0x950 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e irq event stamp: 4252 hardirqs last enabled at (4252): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:187 [inline] hardirqs last enabled at (4252): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:206 hardirqs last disabled at (4251): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:140 [inline] hardirqs last disabled at (4251): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:174 softirqs last enabled at (4246): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last enabled at (4246): [] netif_rx+0x65/0xb0 net/core/dev.c:5770 softirqs last disabled at (4247): [] do_softirq kernel/softirq.c:523 [inline] softirqs last disabled at (4247): [] 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.0.86/6239: #0: ffff888027e9e240 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1029 [inline] #0: ffff888027e9e240 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: __sock_release+0x86/0x260 net/socket.c:721 #1: ffff88806babc360 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1713 [inline] #1: ffff88806babc360 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: pep_sock_close+0x92/0x4c0 net/phonet/pep.c:742 #2: ffffffff8e7e5420 (rcu_read_lock){....}-{1:3}, at: local_lock_release include/linux/local_lock_internal.h:62 [inline] #2: ffffffff8e7e5420 (rcu_read_lock){....}-{1:3}, at: process_backlog+0x32a/0x1580 net/core/dev.c:6664 #3: ffff88806babc968 (slock-AF_PHONET){+.-.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] #3: ffff88806babc968 (slock-AF_PHONET){+.-.}-{3:3}, at: __sk_receive_skb+0x1d3/0xa00 net/core/sock.c:565 #4: ffff88806babc9e0 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: sk_receive_skb include/net/sock.h:2022 [inline] #4: ffff88806babc9e0 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: phonet_rcv+0x84c/0x17f0 net/phonet/af_phonet.c:408 stack backtrace: CPU: 1 UID: 0 PID: 6239 Comm: syz.0.86 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 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0x107/0x4f0 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] __do_fast_syscall_32+0x608/0x950 arch/x86/entry/syscall_32.c:310 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf708ef7c Code: d2 74 05 c1 e8 0c 89 02 8b 5d fc 31 c0 c9 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 2e 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 58 b8 RSP: 002b:00000000f547d50c EFLAGS: 00000292 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000ffffffff RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: d2 74 05 c1 shlb %cl,-0x3f(%rbp,%rax,1) 4: e8 0c 89 02 8b call 0x8b028915 9: 5d pop %rbp a: fc cld b: 31 c0 xor %eax,%eax d: c9 leave e: c3 ret 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: 90 nop 1c: 90 nop 1d: 90 nop 1e: 0f 1f 00 nopl (%rax) 21: 51 push %rcx 22: 52 push %rdx 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 ret 2e: 90 nop 2f: 2e 8d b4 26 00 00 00 cs lea 0x0(%rsi,%riz,1),%esi 36: 00 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 3e: 58 pop %rax 3f: b8 .byte 0xb8