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 @@ -3049,6 +3049,12 @@ static int mptcp_disconnect(struct sock *sk, int flags)
3049
3049
{
3050
3050
struct mptcp_sock * msk = mptcp_sk (sk );
3051
3051
3052
+ /* Deny disconnect if other threads are blocked in sk_wait_event()
3053
+ * or inet_wait_for_connect().
3054
+ */
3055
+ if (sk -> sk_wait_pending )
3056
+ return - EBUSY ;
3057
+
3052
3058
/* We are on the fastopen error path. We can't call straight into the
3053
3059
* subflows cleanup code due to lock nesting (we are already under
3054
3060
* msk->firstsocket lock).
@@ -3114,6 +3120,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
3114
3120
inet_sk (nsk )-> pinet6 = mptcp_inet6_sk (nsk );
3115
3121
#endif
3116
3122
3123
+ nsk -> sk_wait_pending = 0 ;
3117
3124
__mptcp_init_sock (nsk );
3118
3125
3119
3126
msk = mptcp_sk (nsk );
You can’t perform that action at this time.
0 commit comments