]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/rds: Kick-start TCP receiver after accept
authorGerd Rausch <gerd.rausch@oracle.com>
Tue, 3 Feb 2026 05:57:19 +0000 (22:57 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 04:46:38 +0000 (20:46 -0800)
In cases where the server (the node with the higher IP-address)
in an RDS/TCP connection is overwhelmed it is possible that the
socket that was just accepted is chock-full of messages, up to
the limit of what the socket receive buffer permits.

Subsequently, "rds_tcp_data_ready" won't be called anymore,
because there is no more space to receive additional messages.

Nor was it called prior to the point of calling "rds_tcp_set_callbacks",
because the "sk_data_ready" pointer didn't even point to
"rds_tcp_data_ready" yet.

We fix this by simply kick-starting the receive-worker
for all cases where the socket state is neither
"TCP_CLOSE_WAIT" nor "TCP_CLOSE".

Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Link: https://patch.msgid.link/20260203055723.1085751-5-achender@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rds/tcp_listen.c

index 492dcc6568bfb5821389808b0d2570e155f2cde5..b5786227623c1af169b17880832534483abb640d 100644 (file)
@@ -291,6 +291,8 @@ int rds_tcp_accept_one(struct rds_tcp_net *rtn)
            new_sock->sk->sk_state == TCP_LAST_ACK ||
            new_sock->sk->sk_state == TCP_CLOSE)
                rds_conn_path_drop(cp, 0);
+       else
+               queue_delayed_work(cp->cp_wq, &cp->cp_recv_w, 0);
 
        new_sock = NULL;
        ret = 0;