ucx icon indicating copy to clipboard operation
ucx copied to clipboard

UCP/CORE: Check result md_map inside ucp_mem_map()

Open dmitrygx opened this issue 3 years ago • 1 comments

What

Check result md_map inside ucp_mem_map() and report an error if it is empty.

Why ?

Memory handle registration/allocation should be considered as invalid, if no Memory Domains could be used to register memory.

How ?

  1. Combine ucp_memh_create() and ucp_memh_init_uct_reg() to ucp_memh_reg() function.
  2. After calling ucp_mem_alloc()/ucp_memh_reg() check memh->md_map == 0. If it is true, report an error and deallocate a created memory handle.

dmitrygx avatar Sep 20 '22 21:09 dmitrygx

@Artemy-Mellanox @brminich could you review pls?

dmitrygx avatar Sep 21 '22 10:09 dmitrygx

will be combined with #8552, because need to check md_map only for imported memhs

dmitrygx avatar Sep 22 '22 08:09 dmitrygx