The connection can be shutdown while it is processing the
RDMA_CM_EVENT_ESTABLISHED event, and this can lead to panic if the cm_id
has been destroyed.
The fix was to drop the connection if the cm_id has been destroyed.
Orabug:
17213597
Signed-off-by: Richard Frank <richard.frank@oracle.com>
(cherry picked from commit
000fdbea7eab93fc55c45de7302b6560fd41b7f1)
RDS_PROTOCOL_MINOR(conn->c_version),
ic->i_flowctl ? ", flow control" : "");
+ /* The connection might have been dropped under us*/
+ if (!ic->i_cm_id) {
+ rds_conn_drop(conn);
+ return;
+ }
+
ic->i_sl = ic->i_cm_id->route.path_rec->sl;
/*
if (ibic && ibic->i_cm_id == cm_id)
ibic->i_cm_id = NULL;
rds_conn_drop(conn);
- } else if (conn->c_to_index < (RDS_RDMA_RESOLVE_TO_MAX_INDEX-1))
+ }
+ } else if (conn->c_to_index < (RDS_RDMA_RESOLVE_TO_MAX_INDEX-1))
conn->c_to_index++;
- }
break;
case RDMA_CM_EVENT_ROUTE_RESOLVED: