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)
3082
3082
{
3083
3083
struct mptcp_sock * msk = mptcp_sk (sk );
3084
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
+
3085
3091
/* We are on the fastopen error path. We can't call straight into the
3086
3092
* subflows cleanup code due to lock nesting (we are already under
3087
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 );
You can’t perform that action at this time.
0 commit comments