From: Matthieu Baerts Date: Thu, 9 Mar 2023 14:50:03 +0000 (+0100) Subject: mptcp: avoid setting TCP_CLOSE state twice X-Git-Tag: baikal/mips/sdk6.1~37 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=de4c1e51b19a0bcf188e3cd368dfa7ce232d2106;p=kernel.git mptcp: avoid setting TCP_CLOSE state twice commit 244cc9546459f0bee5d5166b2cfc30be5327f089 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: 1d77da55bfcb ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/362 Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 1645336932799..1e10a38ccf9d0 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -358,7 +358,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) &&