Skip to content

Commit b85b24a

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: 30915240 Signed-off-by: Dag Moxnes <[email protected]> Reviewed-by: Håkon Bugge <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]> (cherry picked from commit c58993a) Signed-off-by: Håkon Bugge <[email protected]>
1 parent 0338c10 commit b85b24a

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
@@ -1204,6 +1204,12 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
12041204
if (ic && cm_seq_check_enable)
12051205
ic->i_last_rej_seq = cm_req_seq;
12061206
goto out;
1207+
} else {
1208+
/* Cancel any pending reconnect */
1209+
struct rds_conn_path *cp = &conn->c_path[0];
1210+
1211+
cancel_delayed_work_sync(&cp->cp_conn_w);
1212+
rds_clear_reconnect_pending_work_bit(cp);
12071213
}
12081214

12091215
ic = conn->c_transport_data;

0 commit comments

Comments
 (0)