Skip to content

Commit

Permalink
mptcp: avoid setting TCP_CLOSE state twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
matttbe authored and Sasha Levin committed Mar 22, 2023
1 parent c869287 commit 74e61e2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/mptcp/subflow.c
Expand Up @@ -405,7 +405,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) &&
Expand Down

0 comments on commit 74e61e2

Please sign in to comment.