Skip to content

Commit c58993a

Browse files
Dag MoxnesSomasundaram Krishnasamy
authored andcommitted
rds: Cancel pending connections on connection request
RDS connections can enter the RDS_CONN_CONNECTING state in two ways: 1. It can be started using the connection workqueue (this can happen both on queue_reconnect and upon send if the workqueue is not up) 2. It can enter the RDS_CONN_CONNECTING state due to an incoming connection request In case RDS connections enter RDS_CONN_CONNECTION state due to an incoming connection request, the connection workqueue might already be scheduled. In this case the connection workqueue needs to be cancelled. Failure to do so might result in messages like the following in the kernel trace buffer: cannot transition from allegedly DOWN(act RDS_CONN_UP) to CONNECTING state Orabug: 30473443 Signed-off-by: Dag Moxnes <[email protected]> Reviewed-by: Håkon Bugge <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent ce76398 commit c58993a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

net/rds/ib_cm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,12 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
12611261
if (ic && cm_seq_check_enable)
12621262
ic->i_last_rej_seq = cm_req_seq;
12631263
goto out;
1264+
} else {
1265+
/* Cancel any pending reconnect */
1266+
struct rds_conn_path *cp = &conn->c_path[0];
1267+
1268+
cancel_delayed_work_sync(&cp->cp_conn_w);
1269+
rds_clear_reconnect_pending_work_bit(cp);
12641270
}
12651271

12661272
ic = conn->c_transport_data;

0 commit comments

Comments
 (0)