Skip to content

Commit

Permalink
Merge pull request open-mpi#1770 from hjelmn/rdma_wth
Browse files Browse the repository at this point in the history
btl/openib: fix rdmacm
  • Loading branch information
hjelmn authored Jun 25, 2016
2 parents 6cd5d5c + 17ae1ac commit dac9201
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,13 +886,11 @@ static int rdmacm_module_start_connect(opal_btl_openib_connect_base_module_t *cp
return OPAL_SUCCESS;

out:
for (item = opal_list_remove_first(&(contents->ids));
NULL != item;
item = opal_list_remove_first(&(contents->ids))) {
while (NULL != (item = opal_list_remove_first (&contents->ids))) {
OBJ_RELEASE(item);
}
}

return rc;
return rc;
}

#if !BTL_OPENIB_RDMACM_IB_ADDR
Expand Down Expand Up @@ -1136,7 +1134,7 @@ static void *call_disconnect_callback(int fd, int flags, void *v)
{
rdmacm_contents_t *contents = (rdmacm_contents_t *) v;
void *tmp = NULL;
id_context_t *context = (id_context_t*) v;
id_context_t *context;
opal_list_item_t *item;

pthread_mutex_lock (&rdmacm_disconnect_lock);
Expand Down Expand Up @@ -1325,12 +1323,10 @@ static int rdmacm_disconnected(id_context_t *context)
/* If this was a client thread, then it *may* still be listed in a
contents->ids list. */

context->already_disconnected = true;
if (NULL != context) {
OPAL_OUTPUT((-1, "SERVICE Releasing context because of DISCONNECT: context %p, id %p",
(void*) context, (void*) context->id));
OBJ_RELEASE(context);
}
OPAL_OUTPUT((-1, "SERVICE Releasing context because of DISCONNECT: context %p, id %p",
(void*) context, (void*) context->id));
OBJ_RELEASE(context);

return OPAL_SUCCESS;
}

Expand Down

0 comments on commit dac9201

Please sign in to comment.