Skip to content

Commit

Permalink
RDS: TCP: start multipath acceptor loop at 0
Browse files Browse the repository at this point in the history
The for() loop in rds_tcp_accept_one() assumes that the 0'th
rds_tcp_conn_path is UP and starts multipath accepts at index 1.
But this assumption may not always be true: if the 0'th path
has failed (ERROR or DOWN state) an incoming connection request
should be used to resurrect this path.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sowmini Varadhan authored and David S. Miller committed Nov 9, 2016
1 parent 1ac507d commit 117d15b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rds/tcp_listen.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct rds_tcp_connection *rds_tcp_accept_one_path(struct rds_connection *conn)
if (!peer_is_smaller)
return NULL;

for (i = 1; i < npaths; i++) {
for (i = 0; i < npaths; i++) {
struct rds_conn_path *cp = &conn->c_path[i];

if (rds_conn_path_transition(cp, RDS_CONN_DOWN,
Expand Down

0 comments on commit 117d15b

Please sign in to comment.