summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-04-02 19:41:01 -0700
committerDavid S. Miller <davem@davemloft.net>2017-04-02 19:41:01 -0700
commitd4f4b915829bb5b51b42ee909e6ea3302a715550 (patch)
treea8e64d94e8f4452c60969b63c6471ffd219d42c0
parentd3fbff306c215946cdbcf9ace4d0b78e9f72b5c4 (diff)
parent087d975353d0cc9b7536d6ef46cd9303fceb2e17 (diff)
downloadlinux-d4f4b915829bb5b51b42ee909e6ea3302a715550.tar.gz
linux-d4f4b915829bb5b51b42ee909e6ea3302a715550.tar.bz2
linux-d4f4b915829bb5b51b42ee909e6ea3302a715550.zip
Merge branch 'rds-minor-bug-fixes'
Sowmini Varadhan says: ==================== rds: tcp: couple of minor bug fixes A couple of minor bugfixes that showed up during testing ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/rds/connection.c10
-rw-r--r--net/rds/threads.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 1fa75ab7b733..6a5ebdea7d2e 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -333,11 +333,19 @@ void rds_conn_shutdown(struct rds_conn_path *cp)
rds_conn_path_reset(cp);
if (!rds_conn_path_transition(cp, RDS_CONN_DISCONNECTING,
+ RDS_CONN_DOWN) &&
+ !rds_conn_path_transition(cp, RDS_CONN_ERROR,
RDS_CONN_DOWN)) {
/* This can happen - eg when we're in the middle of tearing
* down the connection, and someone unloads the rds module.
- * Quite reproduceable with loopback connections.
+ * Quite reproducible with loopback connections.
* Mostly harmless.
+ *
+ * Note that this also happens with rds-tcp because
+ * we could have triggered rds_conn_path_drop in irq
+ * mode from rds_tcp_state change on the receipt of
+ * a FIN, thus we need to recheck for RDS_CONN_ERROR
+ * here.
*/
rds_conn_path_error(cp, "%s: failed to transition "
"to state DOWN, current state "
diff --git a/net/rds/threads.c b/net/rds/threads.c
index e36e333a0aa0..3e447d056d09 100644
--- a/net/rds/threads.c
+++ b/net/rds/threads.c
@@ -156,7 +156,7 @@ void rds_connect_worker(struct work_struct *work)
struct rds_connection *conn = cp->cp_conn;
int ret;
- if (cp->cp_index > 1 && cp->cp_conn->c_laddr > cp->cp_conn->c_faddr)
+ if (cp->cp_index > 0 && cp->cp_conn->c_laddr > cp->cp_conn->c_faddr)
return;
clear_bit(RDS_RECONNECT_PENDING, &cp->cp_flags);
ret = rds_conn_path_transition(cp, RDS_CONN_DOWN, RDS_CONN_CONNECTING);