Skip to content

Commit 34d9db9

Browse files
authored
Merge pull request open-mpi#13430 from shijin-aws/osc_rdma_fix
osc/rdma: Fix segfault in shared memory peer initialization
2 parents 333d8ad + 0ddc805 commit 34d9db9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
1919
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
2020
* Copyright (c) 2018 Cisco Systems, Inc. All rights reserved
21-
* Copyright (c) 2018-2022 Amazon.com, Inc. or its affiliates.
21+
* Copyright (c) 2018-2025 Amazon.com, Inc. or its affiliates.
2222
* All Rights reserved.
2323
* Copyright (c) 2019 Research Organization for Information Science
2424
* and Technology (RIST). All rights reserved.
@@ -866,6 +866,8 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
866866
peer->flags |= OMPI_OSC_RDMA_PEER_LOCAL_BASE;
867867
if (use_cpu_atomics) {
868868
peer->flags |= OMPI_OSC_RDMA_PEER_CPU_ATOMICS;
869+
} else if (module->use_memory_registration) {
870+
ex_peer->super.base_handle = (mca_btl_base_registration_handle_t *) peer_region->btl_handle_data;
869871
}
870872
offset += temp[i].size;
871873
offset += OPAL_ALIGN_PAD_AMOUNT(offset, memory_alignment);

0 commit comments

Comments
 (0)