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 236af09 commit 214abaaCopy full SHA for 214abaa
net/mptcp/protocol.c
@@ -2807,6 +2807,12 @@ static int mptcp_disconnect(struct sock *sk, int flags)
2807
struct mptcp_subflow_context *subflow;
2808
struct mptcp_sock *msk = mptcp_sk(sk);
2809
2810
+ /* Deny disconnect if other threads are blocked in sk_wait_event()
2811
+ * or inet_wait_for_connect().
2812
+ */
2813
+ if (sk->sk_wait_pending)
2814
+ return -EBUSY;
2815
+
2816
mptcp_do_flush_join_list(msk);
2817
2818
mptcp_for_each_subflow(msk, subflow) {
@@ -2845,6 +2851,7 @@ struct sock *mptcp_sk_clone(const struct sock *sk,
2845
2851
inet_sk(nsk)->pinet6 = mptcp_inet6_sk(nsk);
2846
2852
#endif
2847
2853
2854
+ nsk->sk_wait_pending = 0;
2848
2855
__mptcp_init_sock(nsk);
2849
2856
2850
2857
msk = mptcp_sk(nsk);
0 commit comments