1
1

osc/rdma: fix typo in compare-and-swap

This commit fixes a typo in compare-and-swap when retrieving the
memory region associated with a displacement. It was erroneously 8
bytes instead of the datatype size. This can cause an incorrect RMA
range error when the compare-and-swap is less than 4 bytes from the
end of the region.

Fixed open-mpi/ompi#2080

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
Nathan Hjelm 2016-09-14 13:10:24 -06:00
родитель 4c9e38e8e0
Коммит 59bae1a330

Просмотреть файл

@ -976,7 +976,7 @@ int ompi_osc_rdma_compare_and_swap (const void *origin_addr, const void *compare
return OMPI_ERR_RMA_SYNC; return OMPI_ERR_RMA_SYNC;
} }
ret = osc_rdma_get_remote_segment (module, peer, target_disp, 8, &target_address, &target_handle); ret = osc_rdma_get_remote_segment (module, peer, target_disp, dt->super.size, &target_address, &target_handle);
if (OPAL_UNLIKELY(OPAL_SUCCESS != ret)) { if (OPAL_UNLIKELY(OPAL_SUCCESS != ret)) {
return ret; return ret;
} }