Skip to content

Commit b263b0d

Browse files
Florian Westphaldavem330
authored andcommitted
mptcp: move subflow close loop after sk close check
In case mptcp socket is already dead the entire mptcp socket will be freed. We can avoid the close check in this case. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 40947e1 commit b263b0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/mptcp/protocol.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2246,9 +2246,6 @@ static void mptcp_worker(struct work_struct *work)
22462246

22472247
mptcp_check_fastclose(msk);
22482248

2249-
if (test_and_clear_bit(MPTCP_WORK_CLOSE_SUBFLOW, &msk->flags))
2250-
__mptcp_close_subflow(msk);
2251-
22522249
if (msk->pm.status)
22532250
mptcp_pm_nl_work(msk);
22542251

@@ -2270,6 +2267,9 @@ static void mptcp_worker(struct work_struct *work)
22702267
goto unlock;
22712268
}
22722269

2270+
if (test_and_clear_bit(MPTCP_WORK_CLOSE_SUBFLOW, &msk->flags))
2271+
__mptcp_close_subflow(msk);
2272+
22732273
if (!test_and_clear_bit(MPTCP_WORK_RTX, &msk->flags))
22742274
goto unlock;
22752275

0 commit comments

Comments
 (0)