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 @@ -3060,6 +3060,12 @@ static int mptcp_disconnect(struct sock *sk, int flags)
3060
3060
{
3061
3061
struct mptcp_sock * msk = mptcp_sk (sk );
3062
3062
3063
+ /* Deny disconnect if other threads are blocked in sk_wait_event()
3064
+ * or inet_wait_for_connect().
3065
+ */
3066
+ if (sk -> sk_wait_pending )
3067
+ return - EBUSY ;
3068
+
3063
3069
/* We are on the fastopen error path. We can't call straight into the
3064
3070
* subflows cleanup code due to lock nesting (we are already under
3065
3071
* msk->firstsocket lock).
@@ -3126,6 +3132,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
3126
3132
inet_sk (nsk )-> pinet6 = mptcp_inet6_sk (nsk );
3127
3133
#endif
3128
3134
3135
+ nsk -> sk_wait_pending = 0 ;
3129
3136
__mptcp_init_sock (nsk );
3130
3137
3131
3138
msk = mptcp_sk (nsk );
You can’t perform that action at this time.
0 commit comments