Skip to content

Commit d70f27f

Browse files
committed
btl/openib: fix a problem with ib query
Under certain circumstances, ibv_exp_query_device was returning an error due to uninitialized fields in the extended attributes struct. Fixes: #5810 Fixes: #5914 Signed-off-by: Howard Pritchard <[email protected]> (cherry picked from commit 8126779)
1 parent dc0e638 commit d70f27f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

opal/mca/btl/openib/btl_openib_component.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
16421642
goto error;
16431643
}
16441644
#if HAVE_DECL_IBV_EXP_QUERY_DEVICE
1645+
memset(&device->ib_exp_dev_attr, 0, sizeof(device->ib_exp_dev_attr));
16451646
device->ib_exp_dev_attr.comp_mask = IBV_EXP_DEVICE_ATTR_RESERVED - 1;
16461647
if(ibv_exp_query_device(device->ib_dev_context, &device->ib_exp_dev_attr)){
16471648
BTL_ERROR(("error obtaining device attributes for %s errno says %s",

0 commit comments

Comments
 (0)