From 84453e03441ef974e6a8265c9de26996d5c226b0 Mon Sep 17 00:00:00 2001 From: Alexia Ingerson Date: Fri, 20 Dec 2024 10:24:28 -0800 Subject: [PATCH] prov/shm: fix name compare bug Could result in a peer getting incorrectly unmmaped Cherry-picked from commit 442fa8991317a004343c7504f7b40c9d87844c58 Signed-off-by: Alexia Ingerson --- prov/shm/src/smr_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prov/shm/src/smr_util.c b/prov/shm/src/smr_util.c index 0c5de80e2a0..0372c7e0597 100644 --- a/prov/shm/src/smr_util.c +++ b/prov/shm/src/smr_util.c @@ -599,7 +599,7 @@ void smr_map_del(struct smr_map *map, int64_t id) assert(id >= 0 && id < SMR_MAX_PEERS); pthread_mutex_lock(&ep_list_lock); dlist_foreach_container(&ep_name_list, struct smr_ep_name, name, entry) { - if (strcmp(name->name, map->peers[id].peer.name)) { + if (!strcmp(name->name, map->peers[id].peer.name)) { local = true; break; }