Skip to content

Commit

Permalink
Revert "mptcp: drop legacy code"
Browse files Browse the repository at this point in the history
This reverts commit ccd4c33.

According to Paolo, this one is causing issue #356 and indirectly #370.

Closes: #356
Signed-off-by: Matthieu Baerts <[email protected]>
  • Loading branch information
matttbe committed Mar 9, 2023
1 parent bed92cb commit 4ef602b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion net/mptcp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,12 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
mptcp_subflow_fully_established(subflow, mp_opt);

check_notify:
if (likely(subflow->pm_notified))
/* if the subflow is not already linked into the conn_list, we can't
* notify the PM: this subflow is still on the listener queue
* and the PM possibly acquiring the subflow lock could race with
* the listener close
*/
if (likely(subflow->pm_notified) || list_empty(&subflow->node))
return true;

subflow->pm_notified = 1;
Expand Down
7 changes: 4 additions & 3 deletions net/mptcp/subflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1871,10 +1871,11 @@ static void subflow_ulp_release(struct sock *ssk)

sk = ctx->conn;
if (sk) {
/* if the subflow has been closed by the TCP stack, keep
* the ctx alive, will be freed by __mptcp_close_ssk()
/* if the msk has been orphaned, keep the ctx
* alive, will be freed by __mptcp_close_ssk(),
* when the subflow is still unaccepted
*/
release = ctx->disposable;
release = ctx->disposable || list_empty(&ctx->node);

/* inet_child_forget() does not call sk_state_change(),
* explicitly trigger the socket close machinery
Expand Down

0 comments on commit 4ef602b

Please sign in to comment.