We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2b2ae3 commit 0ad529dCopy full SHA for 0ad529d
net/mptcp/protocol.c
@@ -3082,6 +3082,12 @@ static int mptcp_disconnect(struct sock *sk, int flags)
3082
{
3083
struct mptcp_sock *msk = mptcp_sk(sk);
3084
3085
+ /* Deny disconnect if other threads are blocked in sk_wait_event()
3086
+ * or inet_wait_for_connect().
3087
+ */
3088
+ if (sk->sk_wait_pending)
3089
+ return -EBUSY;
3090
+
3091
/* We are on the fastopen error path. We can't call straight into the
3092
* subflows cleanup code due to lock nesting (we are already under
3093
* msk->firstsocket lock).
@@ -3148,6 +3154,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
3148
3154
inet_sk(nsk)->pinet6 = mptcp_inet6_sk(nsk);
3149
3155
#endif
3150
3156
3157
+ nsk->sk_wait_pending = 0;
3151
3158
__mptcp_init_sock(nsk);
3152
3159
3153
3160
msk = mptcp_sk(nsk);
0 commit comments