New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid tcp_done()
on already closed sockets
#362
Labels
Projects
Comments
First
This one is a bit obvious: the state is changed to mptcp_net-next/net/mptcp/subflow.c Lines 409 to 411 in 0ca349b
I guess we can remove |
FYI, after having applied this patch, I could not see any others when running the selftests + packetdrill: diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 28c64811a8af..a36d1b1088d7 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -406,7 +406,6 @@ void mptcp_subflow_reset(struct sock *ssk)
/* must hold: tcp_done() could drop last reference on parent */
sock_hold(sk);
- tcp_set_state(ssk, TCP_CLOSE);
tcp_send_active_reset(ssk, GFP_ATOMIC);
tcp_done(ssk);
if (!test_and_set_bit(MPTCP_WORK_CLOSE_SUBFLOW, &mptcp_sk(sk)->flags) && |
matttbe
changed the title
make sure
Avoid Feb 21, 2023
tcp_done()
is not called on already closed socketstcp_done()
on already closed sockets
matttbe
added a commit
that referenced
this issue
Feb 23, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 23, 2023
This is an extra check mainly for the CIs: to make sure we don't call tcp_done() on an already closed socket as it happened in the past. If we do such call, better to catch the error earlier. This is not really related to the Squash-to patch (mptcp: use kmalloc on kasan build) but it is just not to create yet another specific commit for the CI added to both export and export-net branches. This commit can also be renamed to something like: DO-NOT-MERGE: mptcp: improve code coverage for CI WDYT? Closes: #362 Link: https://lore.kernel.org/r/20230221-mptcp-warn-tcp-done-close-v1-2-d248242b29b6@tessares.net Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 23, 2023
This is an extra check mainly for the CIs: to make sure we don't call tcp_done() on an already closed socket as it happened in the past. If we do such call, better to catch the error earlier. This is not really related to the Squash-to patch (mptcp: use kmalloc on kasan build) but it is just not to create yet another specific commit for the CI added to both export and export-net branches. This commit can also be renamed to something like: DO-NOT-MERGE: mptcp: improve code coverage for CI WDYT? Closes: #362 Link: https://lore.kernel.org/r/20230221-mptcp-warn-tcp-done-close-v1-2-d248242b29b6@tessares.net Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 23, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Feb 24, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Feb 24, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 24, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 24, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Feb 25, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Feb 25, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Feb 27, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Feb 27, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 27, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 27, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Feb 28, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Feb 28, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 28, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 28, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 28, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
matttbe
added a commit
that referenced
this issue
Feb 28, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Mar 1, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Mar 1, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
jenkins-tessares
pushed a commit
that referenced
this issue
Mar 2, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Closes: #362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 21, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Whissi
pushed a commit
to Whissi/linux-stable
that referenced
this issue
Mar 22, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Whissi
pushed a commit
to Whissi/linux-stable
that referenced
this issue
Mar 22, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Whissi
pushed a commit
to Whissi/linux-stable
that referenced
this issue
Mar 22, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 22, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 22, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 22, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 22, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2
pushed a commit
to ammarfaizi2/linux-block
that referenced
this issue
Mar 22, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
jpuhlman
pushed a commit
to MontaVista-OpenSourceTechnology/linux-mvista
that referenced
this issue
Mar 30, 2023
Source: Kernel.org MR: 125550 Type: Integration Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-5.10.y ChangeID: f9a98b8dde09330c238cbb556a9f75bd965b91aa Description: commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com>
jpuhlman
pushed a commit
to MontaVista-OpenSourceTechnology/linux-mvista
that referenced
this issue
Mar 30, 2023
Source: Kernel.org MR: 125550 Type: Integration Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-5.10.y ChangeID: f9a98b8dde09330c238cbb556a9f75bd965b91aa Description: commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com>
jpuhlman
pushed a commit
to MontaVista-OpenSourceTechnology/linux-mvista
that referenced
this issue
Mar 30, 2023
Source: Kernel.org MR: 125550 Type: Integration Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-5.10.y ChangeID: f9a98b8dde09330c238cbb556a9f75bd965b91aa Description: commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com>
mcarlin-ds
pushed a commit
to DatumSystems/linux
that referenced
this issue
Apr 18, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sileshn
pushed a commit
to sileshn/ubuntu-kernel-lunar
that referenced
this issue
Apr 19, 2023
BugLink: https://bugs.launchpad.net/bugs/2016876 commit 3ba14528684f528566fb7d956bfbfb958b591d86 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
mj22226
pushed a commit
to mj22226/linux
that referenced
this issue
Apr 21, 2023
tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
oraclelinuxkernel
pushed a commit
to oracle/linux-uek
that referenced
this issue
May 5, 2023
commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit f4afee17de4320cc4eceef599af13365f62a14de) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
ahsanhussain
pushed a commit
to ahsanhussain/linux-flex-imx
that referenced
this issue
May 19, 2023
commit 3ba14528684f528566fb7d956bfbfb958b591d86 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sileshn
pushed a commit
to sileshn/ubuntu-kernel-lunar
that referenced
this issue
May 21, 2023
BugLink: https://bugs.launchpad.net/bugs/2016876 commit 3ba14528684f528566fb7d956bfbfb958b591d86 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
delphix-devops-bot
pushed a commit
to delphix/linux-kernel-aws
that referenced
this issue
Aug 16, 2023
BugLink: https://bugs.launchpad.net/bugs/2023225 commit 3ba14528684f528566fb7d956bfbfb958b591d86 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
wanghao75
pushed a commit
to openeuler-mirror/kernel
that referenced
this issue
Oct 18, 2023
stable inclusion from stable-v5.10.176 commit f9a98b8dde09330c238cbb556a9f75bd965b91aa category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I87BGI Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f9a98b8dde09330c238cbb556a9f75bd965b91aa -------------------------------- commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: sanglipeng <sanglipeng1@jd.com>
wanghao75
pushed a commit
to openeuler-mirror/kernel
that referenced
this issue
Nov 1, 2023
stable inclusion from stable-v5.10.176 commit f9a98b8dde09330c238cbb556a9f75bd965b91aa category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8CHVQ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f9a98b8dde09330c238cbb556a9f75bd965b91aa -------------------------------- commit 3ba1452 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: sanglipeng <sanglipeng1@jd.com>
eclipse-oniro-oh-bot
pushed a commit
to eclipse-oniro-mirrors/kernel_linux_5.10
that referenced
this issue
Nov 20, 2023
stable inclusion from stable-5.10.176 commit f9a98b8dde09330c238cbb556a9f75bd965b91aa category: bugfix issue: #I8D9YM CVE: NA Signed-off-by: yaowenrui2 <yaowenrui2@huawei.com> --------------------------------------- commit 3ba14528684f528566fb7d956bfbfb958b591d86 upstream. tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: multipath-tcp/mptcp_net-next#362 Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: yaowenrui <yaowenrui2@huawei.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calling
tcp_done()
on already closed sockets is illegal.To catch the issue early, it would be good if the CI could look at that:
But before, we need to fix code already doing that.
EDIT: we can also add a
WARN
intcp_set_state()
instead:The text was updated successfully, but these errors were encountered: