Skip to content

Commit

Permalink
tgupdate: merge remotes/origin/t/mptcp-drop-legacy-code onto t/mptcp-…
Browse files Browse the repository at this point in the history
…drop-legacy-code base
  • Loading branch information
matttbe committed Mar 9, 2023
2 parents b6a7703 + c197481 commit bed92cb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
1 change: 1 addition & 0 deletions .topdeps
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
t/mptcp-drop-unneeded-argument
12 changes: 12 additions & 0 deletions .topmsg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
From: Paolo Abeni <[email protected]>
Subject: [PATCH] mptcp: drop legacy code

After the previous commits the PM worker can't race anymore
with the unaccepted subflow close and disposal, as the msk
keeps a reference to such subflow.

We can remove the now irrelevant and confusing checks explicitly
preventing the mentioned race.

Signed-off-by: Paolo Abeni <[email protected]>
Reviewed-by: Matthieu Baerts <[email protected]>
7 changes: 1 addition & 6 deletions net/mptcp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,12 +988,7 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
mptcp_subflow_fully_established(subflow, mp_opt);

check_notify:
/* 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))
if (likely(subflow->pm_notified))
return true;

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

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

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

0 comments on commit bed92cb

Please sign in to comment.