Skip to content

Commit 5ab779a

Browse files
Paolo Abenigregkh
authored andcommitted
mptcp: do not wakeup listener for MPJ subflows
commit 52557db upstream. MPJ subflows are not exposed as fds to user spaces. As such, incoming MPJ subflows are removed from the accept queue by tcp_check_req()/tcp_get_cookie_sock(). Later tcp_child_process() invokes subflow_data_ready() on the parent socket regardless of the subflow kind, leading to poll wakeups even if the later accept will block. Address the issue by double-checking the queue state before waking the user-space. Closes: multipath-tcp/mptcp_net-next#164 Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Fixes: f296234 ("mptcp: Add handling of incoming MP_JOIN requests") Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9adbc25 commit 5ab779a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎net/mptcp/subflow.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,12 @@ static void subflow_data_ready(struct sock *sk)
981981

982982
msk = mptcp_sk(parent);
983983
if (state & TCPF_LISTEN) {
984+
/* MPJ subflow are removed from accept queue before reaching here,
985+
* avoid stray wakeups
986+
*/
987+
if (reqsk_queue_empty(&inet_csk(sk)->icsk_accept_queue))
988+
return;
989+
984990
set_bit(MPTCP_DATA_READY, &msk->flags);
985991
parent->sk_data_ready(parent);
986992
return;

0 commit comments

Comments
 (0)