Skip to content

Commit 44a7e81

Browse files
committed
smsc/xpmem: Fix bound alignment
The upper bound of the mapped region must include the last byte of the range and not reach past the aligned range. Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
1 parent 0a180c1 commit 44a7e81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opal/mca/smsc/xpmem/smsc_xpmem_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void *mca_smsc_xpmem_map_peer_region(mca_smsc_endpoint_t *endpoint, uint64_t fla
116116
int rc;
117117

118118
base = OPAL_DOWN_ALIGN((uintptr_t) remote_ptr, attach_align, uintptr_t);
119-
bound = OPAL_ALIGN((uintptr_t) remote_ptr + size - 1, attach_align, uintptr_t) + 1;
119+
bound = OPAL_ALIGN((uintptr_t) remote_ptr + size, attach_align, uintptr_t);
120120
if (OPAL_UNLIKELY(bound > xpmem_endpoint->address_max)) {
121121
bound = xpmem_endpoint->address_max;
122122
}

0 commit comments

Comments
 (0)