Skip to content

Commit d94da20

Browse files
committed
Don't overwrite NULL descriptors.
If the descriptor is NULL in sendi don't try to provide back a fragment. Signed-off-by: George Bosilca <[email protected]>
1 parent 9d94a14 commit d94da20

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

opal/mca/btl/smcuda/btl_smcuda.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,7 @@ int mca_btl_smcuda_sendi(struct mca_btl_base_module_t *btl,
887887
/* note that frag==NULL is equivalent to rc returning an error code */
888888
MCA_BTL_SMCUDA_FRAG_ALLOC_EAGER(frag);
889889
if (OPAL_UNLIKELY(NULL == frag)) {
890-
*descriptor = NULL;
891-
return OPAL_ERR_OUT_OF_RESOURCE;
890+
goto return_resource_busy;
892891
}
893892

894893
/* fill in fragment fields */
@@ -940,7 +939,7 @@ int mca_btl_smcuda_sendi(struct mca_btl_base_module_t *btl,
940939

941940
return_resource_busy:
942941
if (NULL != descriptor) {
943-
*descriptor = mca_btl_smcuda_alloc(btl, endpoint, order, payload_size + header_size, flags);
942+
*descriptor = mca_btl_smcuda_alloc(btl, endpoint, order, length, flags);
944943
}
945944
return OPAL_ERR_RESOURCE_BUSY;
946945
}

0 commit comments

Comments
 (0)