mptcp: ensure subflow is unhashed before cleaning the backlog
commitpull/1175/head3fffa15bfeupstream. While tacking care of the mptcp-level listener I unintentionally moved the subflow level unhash after the subflow listener backlog cleanup. That could cause some nasty race and makes the code harder to read. Address the issue restoring the proper order of operations. Fixes:57fc0f1cea("mptcp: ensure listener is unhashed before updating the sk status") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
ab79c7541d
commit
bd2decac73
|
|
@ -2945,9 +2945,9 @@ static void mptcp_check_listen_stop(struct sock *sk)
|
|||
return;
|
||||
|
||||
lock_sock_nested(ssk, SINGLE_DEPTH_NESTING);
|
||||
tcp_set_state(ssk, TCP_CLOSE);
|
||||
mptcp_subflow_queue_clean(sk, ssk);
|
||||
inet_csk_listen_stop(ssk);
|
||||
tcp_set_state(ssk, TCP_CLOSE);
|
||||
release_sock(ssk);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue