File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -3082,6 +3082,12 @@ static int mptcp_disconnect(struct sock *sk, int flags)
30823082{
30833083 struct mptcp_sock * msk = mptcp_sk (sk );
30843084
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+
30853091 /* We are on the fastopen error path. We can't call straight into the
30863092 * subflows cleanup code due to lock nesting (we are already under
30873093 * msk->firstsocket lock).
@@ -3148,6 +3154,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
31483154 inet_sk (nsk )-> pinet6 = mptcp_inet6_sk (nsk );
31493155#endif
31503156
3157+ nsk -> sk_wait_pending = 0 ;
31513158 __mptcp_init_sock (nsk );
31523159
31533160 msk = mptcp_sk (nsk );
You can’t perform that action at this time.
0 commit comments