diff --git a/prov/coll/src/coll_coll.c b/prov/coll/src/coll_coll.c index 158f7f47eaf..63fa5b5d7b7 100644 --- a/prov/coll/src/coll_coll.c +++ b/prov/coll/src/coll_coll.c @@ -931,8 +931,10 @@ int coll_join_collective(struct fid_ep *ep, const void *addr, av_set = container_of(set, struct util_av_set, av_set_fid); if (coll_addr == FI_ADDR_NOTAVAIL) { + ofi_mutex_lock(&av_set->av->lock); assert(av_set->av->av_set); coll_mc = &av_set->av->av_set->coll_mc; + ofi_mutex_unlock(&av_set->av->lock); } else { coll_mc = (struct util_coll_mc*) ((uintptr_t) coll_addr); }