Skip to content

Commit

Permalink
btl/openib: fix a problem with ib query
Browse files Browse the repository at this point in the history
Under certain circumstances, ibv_exp_query_device was
returning an error due to uninitialized fields in the
extended attributes struct.

Fixes: open-mpi#5810
Fixes: open-mpi#5914

Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit 8126779)
  • Loading branch information
hppritcha committed Nov 2, 2018
1 parent e851879 commit bbfde15
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions opal/mca/btl/openib/btl_openib_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
goto error;
}
#if HAVE_DECL_IBV_EXP_QUERY_DEVICE
memset(&device->ib_exp_dev_attr, 0, sizeof(device->ib_exp_dev_attr));
device->ib_exp_dev_attr.comp_mask = IBV_EXP_DEVICE_ATTR_RESERVED - 1;
if(ibv_exp_query_device(device->ib_dev_context, &device->ib_exp_dev_attr)){
BTL_ERROR(("error obtaining device attributes for %s errno says %s",
Expand Down

0 comments on commit bbfde15

Please sign in to comment.