mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
Merge branch 'mptcp-more-fixes-for-6-1'
Matthieu Baerts says: ==================== mptcp: More fixes for 6.1 Patch 1 makes sure data received after a close will still be processed and acked as exepected. This is a regression for a commit introduced in v5.11. Patch 2 fixes a kernel deadlock found when working on validating TFO with a listener MPTCP socket. This is not directly linked to TFO but it is easier to reproduce the issue with it. This fixes a bug introduced by a commit from v6.0. ==================== Link: https://lore.kernel.org/r/20221128154239.1999234-1-matthieu.baerts@tessares.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
ce2e1c6d90
2 changed files with 9 additions and 10 deletions
|
@ -2354,12 +2354,7 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,
|
|||
goto out;
|
||||
}
|
||||
|
||||
/* if we are invoked by the msk cleanup code, the subflow is
|
||||
* already orphaned
|
||||
*/
|
||||
if (ssk->sk_socket)
|
||||
sock_orphan(ssk);
|
||||
|
||||
sock_orphan(ssk);
|
||||
subflow->disposable = 1;
|
||||
|
||||
/* if ssk hit tcp_done(), tcp_cleanup_ulp() cleared the related ops
|
||||
|
@ -2940,7 +2935,11 @@ cleanup:
|
|||
if (ssk == msk->first)
|
||||
subflow->fail_tout = 0;
|
||||
|
||||
sock_orphan(ssk);
|
||||
/* detach from the parent socket, but allow data_ready to
|
||||
* push incoming data into the mptcp stack, to properly ack it
|
||||
*/
|
||||
ssk->sk_socket = NULL;
|
||||
ssk->sk_wq = NULL;
|
||||
unlock_sock_fast(ssk, slow);
|
||||
}
|
||||
sock_orphan(sk);
|
||||
|
|
|
@ -1745,16 +1745,16 @@ void mptcp_subflow_queue_clean(struct sock *listener_ssk)
|
|||
|
||||
for (msk = head; msk; msk = next) {
|
||||
struct sock *sk = (struct sock *)msk;
|
||||
bool slow, do_cancel_work;
|
||||
bool do_cancel_work;
|
||||
|
||||
sock_hold(sk);
|
||||
slow = lock_sock_fast_nested(sk);
|
||||
lock_sock_nested(sk, SINGLE_DEPTH_NESTING);
|
||||
next = msk->dl_next;
|
||||
msk->first = NULL;
|
||||
msk->dl_next = NULL;
|
||||
|
||||
do_cancel_work = __mptcp_close(sk, 0);
|
||||
unlock_sock_fast(sk, slow);
|
||||
release_sock(sk);
|
||||
if (do_cancel_work)
|
||||
mptcp_cancel_work(sk);
|
||||
sock_put(sk);
|
||||
|
|
Loading…
Add table
Reference in a new issue