From 446ff0d02149da57a61fe5fb9ff155b903b66240 Mon Sep 17 00:00:00 2001 From: Roie Danino Date: Thu, 28 Aug 2025 15:02:59 +0300 Subject: [PATCH] SRC/UCP/CORE: set FLAG_LOCK for allocated buffers when NONBLOCK wasn't passed to ucp_mem_map Signed-off-by: Roie Danino --- src/ucp/core/ucp_mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ucp/core/ucp_mm.c b/src/ucp/core/ucp_mm.c index 783cdce1f8b..664554ed62c 100644 --- a/src/ucp/core/ucp_mm.c +++ b/src/ucp/core/ucp_mm.c @@ -319,7 +319,8 @@ ucp_mem_map_params2uct_flags(const ucp_context_h context, if (params->field_mask & UCP_MEM_MAP_PARAM_FIELD_FLAGS) { if (params->flags & UCP_MEM_MAP_NONBLOCK) { flags |= UCT_MD_MEM_FLAG_NONBLOCK; - } else if (params->flags & UCP_MEM_MAP_LOCK) { + } else if ((params->flags & UCP_MEM_MAP_LOCK) || + (params->flags & UCP_MEM_MAP_ALLOCATE)) { flags |= UCT_MD_MEM_FLAG_LOCK; }