Skip to content

Commit 8126779

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 <howardp@lanl.gov>
1 parent 2da3170 commit 8126779

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
@@ -1694,6 +1694,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
16941694
goto error;
16951695
}
16961696
#if HAVE_DECL_IBV_EXP_QUERY_DEVICE
1697+
memset(&device->ib_exp_dev_attr, 0, sizeof(device->ib_exp_dev_attr));
16971698
device->ib_exp_dev_attr.comp_mask = IBV_EXP_DEVICE_ATTR_RESERVED - 1;
16981699
if(ibv_exp_query_device(device->ib_dev_context, &device->ib_exp_dev_attr)){
16991700
BTL_ERROR(("error obtaining device attributes for %s errno says %s",

0 commit comments

Comments
 (0)