]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rds: tcp: canonical connection order for all paths with index > 0
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Wed, 31 May 2017 19:11:20 +0000 (12:11 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 10 Jun 2017 00:48:14 +0000 (17:48 -0700)
The rds_connect_worker() has a bug in the check that enforces the
canonical connection order described in the comments of
rds_tcp_state_change(). The intention is to make sure that all
the multipath connections are always initiated by the smaller IP
address via rds_start_mprds. To achieve this, rds_connection_worker
should check that cp_index > 0.

Orabug: 26241322

(Cherry-pick of upstream 087d975353d0cc9b7536d6ef46cd9303fceb2e17)

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>
net/rds/threads.c

index e4ea0c4f74407c5e8b2b58424ab3e795521f29f1..1e0ea785e4dbfea44a7ba61e368a24af3cd85c66 100644 (file)
@@ -177,7 +177,7 @@ void rds_connect_worker(struct work_struct *work)
        int ret;
        bool is_tcp = conn->c_trans->t_type == RDS_TRANS_TCP;
 
-       if (is_tcp && cp->cp_index > 1 &&
+       if (is_tcp && cp->cp_index > 0 &&
            cp->cp_conn->c_laddr > cp->cp_conn->c_faddr)
                return;
        clear_bit(RDS_RECONNECT_PENDING, &cp->cp_flags);