Re: [syzbot] [tipc?] BUG: soft lockup in do_sock_setsockopt

From: Hillf Danton
Date: Fri Mar 22 2024 - 20:02:55 EST


On Fri, 22 Mar 2024 07:23:18 -0700
> syzbot found the following issue on:
>
> HEAD commit: 707081b61156 Merge branch 'for-next/core', remote-tracking..
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=114e4c81180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci

--- x/net/tipc/socket.c
+++ y/net/tipc/socket.c
@@ -2488,6 +2488,11 @@ void tipc_sk_rcv(struct net *net, struct
struct tipc_sock *tsk;
struct sock *sk;
struct sk_buff *skb;
+ static int reent = 0;
+
+ if (reent)
+ return;
+ reent++;

__skb_queue_head_init(&xmitq);
while (skb_queue_len(inputq)) {
@@ -2524,6 +2529,7 @@ xmit:
dnode = msg_destnode(buf_msg(skb));
tipc_node_xmit_skb(net, skb, dnode, dport);
}
+ --reent;
}

static int tipc_wait_for_connect(struct socket *sock, long *timeo_p)
--