Skip to content

Commit bd2deca

Browse files
Paolo Abenigregkh
authored andcommitted
mptcp: ensure subflow is unhashed before cleaning the backlog
commit 3fffa15 upstream. 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: 57fc0f1 ("mptcp: ensure listener is unhashed before updating the sk status") Cc: [email protected] Signed-off-by: Paolo Abeni <[email protected]> Reviewed-by: Matthieu Baerts <[email protected]> Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ab79c75 commit bd2deca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mptcp/protocol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2945,9 +2945,9 @@ static void mptcp_check_listen_stop(struct sock *sk)
29452945
return;
29462946

29472947
lock_sock_nested(ssk, SINGLE_DEPTH_NESTING);
2948+
tcp_set_state(ssk, TCP_CLOSE);
29482949
mptcp_subflow_queue_clean(sk, ssk);
29492950
inet_csk_listen_stop(ssk);
2950-
tcp_set_state(ssk, TCP_CLOSE);
29512951
release_sock(ssk);
29522952
}
29532953

0 commit comments

Comments
 (0)