Skip to content

Commit d6b0066

Browse files
committed
Merge pull request #826 from hjelmn/openib_thread_fix
btl/openib: add missing lock calls
2 parents db2d37a + 8205d79 commit d6b0066

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

opal/mca/btl/openib/connect/btl_openib_connect_udcm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,8 @@ static int udcm_endpoint_init_self_xrc (struct mca_btl_base_endpoint_t *lcl_ep)
554554

555555
lcl_ep->endpoint_state = MCA_BTL_IB_CONNECTED;
556556

557+
/* need to hold the endpoint lock before calling udcm_finish_connection */
558+
OPAL_THREAD_LOCK(&lcl_ep->endpoint_lock);
557559
rc = udcm_finish_connection (lcl_ep);
558560
} while (0);
559561
opal_mutex_unlock (&udep->udep_lock);
@@ -594,6 +596,8 @@ static int udcm_endpoint_init_self (struct mca_btl_base_endpoint_t *lcl_ep)
594596

595597
lcl_ep->endpoint_state = MCA_BTL_IB_CONNECTED;
596598

599+
/* need to hold the endpoint lock before calling udcm_finish_connection */
600+
OPAL_THREAD_LOCK(&lcl_ep->endpoint_lock);
597601
rc = udcm_finish_connection (lcl_ep);
598602

599603
return OPAL_SUCCESS;

0 commit comments

Comments
 (0)