Skip to content

Commit 19be439

Browse files
authored
Merge pull request #1949 from hjelmn/ugni_fix
btl/ugni: fix another connection race
2 parents 38f18ee + adb6682 commit 19be439

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

opal/mca/btl/ugni/btl_ugni_component.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ mca_btl_ugni_progress_datagram (mca_btl_ugni_module_t *ugni_module)
430430
/* check for datagram completion */
431431
OPAL_THREAD_LOCK(&ugni_module->device->dev_lock); /* TODO: may not need lock for this function */
432432
grc = GNI_PostDataProbeById (ugni_module->device->dev_handle, &datagram_id);
433-
OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock);
434433
if (OPAL_LIKELY(GNI_RC_SUCCESS != grc)) {
434+
OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock);
435435
return 0;
436436
}
437437

@@ -447,7 +447,6 @@ mca_btl_ugni_progress_datagram (mca_btl_ugni_module_t *ugni_module)
447447
}
448448

449449
/* wait for the incoming datagram to complete (in case it isn't) */
450-
OPAL_THREAD_LOCK(&ugni_module->device->dev_lock); /* TODO: may not need lock for this function */
451450
grc = GNI_EpPostDataWaitById (handle, datagram_id, -1, &post_state,
452451
&remote_addr, &remote_id);
453452
OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock);

0 commit comments

Comments
 (0)