Skip to content

Commit

Permalink
tgupdate: merge t/upstream base into t/upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
matttbe committed Dec 17, 2021
2 parents cabf1e0 + d473157 commit 82c9185
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,17 @@ void mptcp_data_ready(struct sock *sk, struct sock *ssk)

static bool __mptcp_finish_join(struct mptcp_sock *msk, struct sock *ssk)
{
if (((struct sock *)msk)->sk_state != TCP_ESTABLISHED)
struct sock *sk = (struct sock *)msk;

if (sk->sk_state != TCP_ESTABLISHED)
return false;

/* attach to msk socket only after we are sure we will deal with it
* at close time
*/
if (sk->sk_socket && !ssk->sk_socket)
mptcp_sock_graft(ssk, sk->sk_socket);

mptcp_propagate_sndbuf((struct sock *)msk, ssk);
mptcp_sockopt_sync_locked(msk, ssk);
WRITE_ONCE(msk->allow_infinite_fallback, false);
Expand Down Expand Up @@ -3237,7 +3245,6 @@ bool mptcp_finish_join(struct sock *ssk)
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);
struct mptcp_sock *msk = mptcp_sk(subflow->conn);
struct sock *parent = (void *)msk;
struct socket *parent_sock;
bool ret = true;

pr_debug("msk=%p, subflow=%p", msk, subflow);
Expand Down Expand Up @@ -3281,13 +3288,6 @@ bool mptcp_finish_join(struct sock *ssk)
return false;
}

/* attach to msk socket only after we are sure he will deal with us
* at close time
*/
parent_sock = READ_ONCE(parent->sk_socket);
if (parent_sock && !ssk->sk_socket)
mptcp_sock_graft(ssk, parent_sock);

subflow->map_seq = READ_ONCE(msk->ack_seq);

out:
Expand Down

0 comments on commit 82c9185

Please sign in to comment.