============================================
WARNING: possible recursive locking detected
6.11.0-syzkaller #0 Not tainted
--------------------------------------------
syz.0.4133/14682 is trying to acquire lock:
ffff888062dc3c98 (k-slock-AF_INET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff888062dc3c98 (k-slock-AF_INET){+.-.}-{2:2}, at: sk_clone_lock+0x306/0x12c0 net/core/sock.c:2328
but task is already holding lock:
ffff8880773a7018 (k-slock-AF_INET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff8880773a7018 (k-slock-AF_INET){+.-.}-{2:2}, at: sk_clone_lock+0x306/0x12c0 net/core/sock.c:2328
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(k-slock-AF_INET);
lock(k-slock-AF_INET);
*** DEADLOCK ***
May be due to missing lock nesting notation
7 locks held by syz.0.4133/14682:
#0: ffff888062dc3158 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1607 [inline]
#0: ffff888062dc3158 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_stream_connect+0x43/0xa0 net/ipv4/af_inet.c:749
#1: ffff8880773a6458 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1607 [inline]
#1: ffff8880773a6458 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: mptcp_connect+0x5aa/0xd20 net/mptcp/protocol.c:3762
#2: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
#2: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#2: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x72/0x1940 net/ipv4/ip_output.c:470
#3: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
#3: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#3: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x364/0x2590 net/ipv4/ip_output.c:228
#4: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: local_lock_release include/linux/local_lock_internal.h:38 [inline]
#4: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: process_backlog+0x3f1/0x15f0 net/core/dev.c:6106
#5: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
#5: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#5: ffffffff8ddb94a0 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0x263/0x570 net/ipv4/ip_input.c:232
#6: ffff8880773a7018 (k-slock-AF_INET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#6: ffff8880773a7018 (k-slock-AF_INET){+.-.}-{2:2}, at: sk_clone_lock+0x306/0x12c0 net/core/sock.c:2328
stack backtrace:
CPU: 2 UID: 0 PID: 14682 Comm: syz.0.4133 Not tainted 6.11.0-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:93 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119
check_deadlock kernel/locking/lockdep.c:3061 [inline]
validate_chain kernel/locking/lockdep.c:3855 [inline]
__lock_acquire+0x2167/0x3cb0 kernel/locking/lockdep.c:5142
lock_acquire kernel/locking/lockdep.c:5759 [inline]
lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
sk_clone_lock+0x306/0x12c0 net/core/sock.c:2328
mptcp_sk_clone_init+0x30/0x1480 net/mptcp/protocol.c:3279
subflow_syn_recv_sock+0xeca/0x14a0 net/mptcp/subflow.c:874
tcp_check_req+0x9ab/0x1fb0 net/ipv4/tcp_minisocks.c:853
tcp_v4_rcv+0x180a/0x43b0 net/ipv4/tcp_ipv4.c:2267
ip_protocol_deliver_rcu+0xba/0x4c0 net/ipv4/ip_input.c:205
ip_local_deliver_finish+0x316/0x570 net/ipv4/ip_input.c:233
NF_HOOK include/linux/netfilter.h:314 [inline]
NF_HOOK include/linux/netfilter.h:308 [inline]
ip_local_deliver+0x18e/0x1f0 net/ipv4/ip_input.c:254
dst_input include/net/dst.h:460 [inline]
ip_rcv_finish net/ipv4/ip_input.c:449 [inline]
NF_HOOK include/linux/netfilter.h:314 [inline]
NF_HOOK include/linux/netfilter.h:308 [inline]
ip_rcv+0x2c5/0x5d0 net/ipv4/ip_input.c:569
__netif_receive_skb_one_core+0x199/0x1e0 net/core/dev.c:5661
__netif_receive_skb+0x1d/0x160 net/core/dev.c:5775
process_backlog+0x443/0x15f0 net/core/dev.c:6108
__napi_poll.constprop.0+0xb7/0x550 net/core/dev.c:6772
napi_poll net/core/dev.c:6841 [inline]
net_rx_action+0xa92/0x1010 net/core/dev.c:6963
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
do_softirq kernel/softirq.c:455 [inline]
do_softirq+0xb2/0xf0 kernel/softirq.c:442
__local_bh_enable_ip+0x100/0x120 kernel/softirq.c:382
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:908 [inline]
__dev_queue_xmit+0x882/0x4300 net/core/dev.c:4450
dev_queue_xmit include/linux/netdevice.h:3105 [inline]
neigh_hh_output include/net/neighbour.h:526 [inline]
neigh_output include/net/neighbour.h:540 [inline]
ip_finish_output2+0x16c1/0x2590 net/ipv4/ip_output.c:235
__ip_finish_output net/ipv4/ip_output.c:313 [inline]
__ip_finish_output+0x49e/0x950 net/ipv4/ip_output.c:295
ip_finish_output+0x31/0x310 net/ipv4/ip_output.c:323
NF_HOOK_COND include/linux/netfilter.h:303 [inline]
ip_output+0x13b/0x2a0 net/ipv4/ip_output.c:433
dst_output include/net/dst.h:450 [inline]
ip_local_out+0x33e/0x4a0 net/ipv4/ip_output.c:129
__ip_queue_xmit+0x747/0x1940 net/ipv4/ip_output.c:535
__tcp_transmit_skb+0x2a3a/0x3da0 net/ipv4/tcp_output.c:1466
__tcp_send_ack.part.0+0x390/0x720 net/ipv4/tcp_output.c:4268
__tcp_send_ack net/ipv4/tcp_output.c:4274 [inline]
tcp_send_ack+0x82/0xa0 net/ipv4/tcp_output.c:4274
tcp_rcv_synsent_state_process net/ipv4/tcp_input.c:6542 [inline]
tcp_rcv_state_process+0x4332/0x4f30 net/ipv4/tcp_input.c:6729
tcp_v4_do_rcv+0x1ad/0xa90 net/ipv4/tcp_ipv4.c:1934
sk_backlog_rcv include/net/sock.h:1111 [inline]
__release_sock+0x31b/0x400 net/core/sock.c:3004
release_sock+0x5a/0x220 net/core/sock.c:3558
mptcp_connect+0xabd/0xd20 net/mptcp/protocol.c:3784
__inet_stream_connect+0x3c7/0x1020 net/ipv4/af_inet.c:679
inet_stream_connect+0x57/0xa0 net/ipv4/af_inet.c:750
__sys_connect_file+0x15f/0x1a0 net/socket.c:2061
__sys_connect+0x149/0x170 net/socket.c:2078
__do_sys_connect net/socket.c:2088 [inline]
__se_sys_connect net/socket.c:2085 [inline]
__ia32_sys_connect+0x71/0xb0 net/socket.c:2085
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf7f45579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f56c656c EFLAGS: 00000296 ORIG_RAX: 000000000000016a
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000020000000
RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
----------------
Code disassembly (best guess), 2 bytes skipped:
0: 10 06 adc %al,(%rsi)
2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi
6: 10 07 adc %al,(%rdi)
8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi
c: 10 08 adc %cl,(%rax)
e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi
1e: 00 51 52 add %dl,0x52(%rcx)
21: 55 push %rbp
22: 89 e5 mov %esp,%ebp
24: 0f 34 sysenter
26: cd 80 int $0x80
* 28: 5d pop %rbp <-- trapping instruction
29: 5a pop %rdx
2a: 59 pop %rcx
2b: c3 ret
2c: 90 nop
2d: 90 nop
2e: 90 nop
2f: 90 nop
30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi
37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi