============================================ WARNING: possible recursive locking detected 6.12.0-rc1-syzkaller-00010-gc05ad457ce8c #0 Not tainted -------------------------------------------- syz.0.736/9831 is trying to acquire lock: ff6000001a9bb1d8 (k-slock-AF_INET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ff6000001a9bb1d8 (k-slock-AF_INET){+.-.}-{2:2}, at: sk_clone_lock+0x34c/0x1154 net/core/sock.c:2396 but task is already holding lock: ff6000001e84b4d8 (k-slock-AF_INET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ff6000001e84b4d8 (k-slock-AF_INET){+.-.}-{2:2}, at: sk_clone_lock+0x34c/0x1154 net/core/sock.c:2396 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.736/9831: #0: ff6000001a9ba658 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1609 [inline] #0: ff6000001a9ba658 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_stream_connect+0x48/0xa0 net/ipv4/af_inet.c:749 #1: ff6000001e848f18 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1609 [inline] #1: ff6000001e848f18 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: mptcp_connect+0x4e0/0xf42 net/mptcp/protocol.c:3760 #2: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: read_pnet include/net/net_namespace.h:383 [inline] #2: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: sock_net include/net/sock.h:655 [inline] #2: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x52/0x1b20 net/ipv4/ip_output.c:461 #3: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:98 [inline] #3: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x456/0x2c48 net/ipv4/ip_output.c:222 #4: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: local_lock_release include/linux/local_lock_internal.h:37 [inline] #4: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: process_backlog+0x482/0x1cbc net/core/dev.c:6105 #5: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: __skb_pull include/linux/skbuff.h:2768 [inline] #5: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0x216/0x57c net/ipv4/ip_input.c:230 #6: ff6000001e84b4d8 (k-slock-AF_INET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #6: ff6000001e84b4d8 (k-slock-AF_INET){+.-.}-{2:2}, at: sk_clone_lock+0x34c/0x1154 net/core/sock.c:2396 stack backtrace: CPU: 1 UID: 0 PID: 9831 Comm: syz.0.736 Not tainted 6.12.0-rc1-syzkaller-00010-gc05ad457ce8c #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:130 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:136 [] __dump_stack lib/dump_stack.c:94 [inline] [] dump_stack_lvl+0x122/0x196 lib/dump_stack.c:120 [] dump_stack+0x1c/0x24 lib/dump_stack.c:129 [] print_deadlock_bug+0x6ac/0x70a kernel/locking/lockdep.c:3037 [] check_deadlock kernel/locking/lockdep.c:3089 [inline] [] validate_chain kernel/locking/lockdep.c:3891 [inline] [] __lock_acquire+0x34e8/0x8320 kernel/locking/lockdep.c:5202 [] lock_acquire.part.0+0x2c6/0x81c kernel/locking/lockdep.c:5825 [] lock_acquire+0x74/0x98 kernel/locking/lockdep.c:5798 [] __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] [] _raw_spin_lock+0x32/0x48 kernel/locking/spinlock.c:154 [] spin_lock include/linux/spinlock.h:351 [inline] [] sk_clone_lock+0x34c/0x1154 net/core/sock.c:2396 [] mptcp_sk_clone_init+0x3e/0x1564 net/mptcp/protocol.c:3279 [] subflow_syn_recv_sock+0x11a4/0x1b24 net/mptcp/subflow.c:878 [] tcp_check_req+0x9ac/0x21a2 net/ipv4/tcp_minisocks.c:858 [] tcp_v4_rcv+0x17ec/0x462e net/ipv4/tcp_ipv4.c:2271 [] ip_protocol_deliver_rcu+0xa2/0x64a net/ipv4/ip_input.c:205 [] ip_local_deliver_finish+0x2ec/0x57c 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+0x1b2/0x568 net/ipv4/ip_input.c:254 [] dst_input include/net/dst.h:460 [inline] [] ip_rcv_finish+0x1b0/0x2d2 net/ipv4/ip_input.c:449 [] NF_HOOK include/linux/netfilter.h:314 [inline] [] NF_HOOK include/linux/netfilter.h:308 [inline] [] ip_rcv+0xd6/0x44e net/ipv4/ip_input.c:569 [] __netif_receive_skb_one_core+0x106/0x16e net/core/dev.c:5662 [] __netif_receive_skb+0x2c/0x144 net/core/dev.c:5775 [] process_backlog+0x4fc/0x1cbc net/core/dev.c:6107 [] __napi_poll.constprop.0+0xaa/0x4b8 net/core/dev.c:6771 [] napi_poll net/core/dev.c:6840 [inline] [] net_rx_action+0xa12/0xf10 net/core/dev.c:6962 [] handle_softirqs+0x4a6/0x10de kernel/softirq.c:554 [] __do_softirq+0x12/0x1a kernel/softirq.c:588 [] ___do_softirq+0x18/0x20 arch/riscv/kernel/irq.c:85 [] call_on_irq_stack+0x32/0x40 arch/riscv/kernel/entry.S:355