daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
Pablo Greco 48fc63
From 7ae5fed80b6d7dbe70a36e85ab05415b11bbbc00 Mon Sep 17 00:00:00 2001
Pablo Greco 48fc63
From: Jan Synacek <jsynacek@redhat.com>
Pablo Greco 48fc63
Date: Tue, 5 Mar 2019 10:21:55 +0100
Pablo Greco 48fc63
Subject: [PATCH] hashmap: don't use mempool
Pablo Greco 48fc63
Pablo Greco 48fc63
RHEL-only
Pablo Greco 48fc63
Pablo Greco 48fc63
Resolves: #1609349
Pablo Greco 48fc63
---
Pablo Greco 48fc63
 src/shared/hashmap.c | 3 ++-
Pablo Greco 48fc63
 1 file changed, 2 insertions(+), 1 deletion(-)
Pablo Greco 48fc63
Pablo Greco 48fc63
diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c
Pablo Greco 48fc63
index e63ba4bb5a..c05f79a393 100644
Pablo Greco 48fc63
--- a/src/shared/hashmap.c
Pablo Greco 48fc63
+++ b/src/shared/hashmap.c
Pablo Greco 48fc63
@@ -776,7 +776,8 @@ static struct HashmapBase *hashmap_base_new(const struct hash_ops *hash_ops, enu
Pablo Greco 48fc63
         const struct hashmap_type_info *hi = &hashmap_type_info[type];
Pablo Greco 48fc63
         bool use_pool;
Pablo Greco 48fc63
 
Pablo Greco 48fc63
-        use_pool = is_main_thread();
Pablo Greco 48fc63
+        /* RHEL-only. See #1609349. */
Pablo Greco 48fc63
+        use_pool = false;
Pablo Greco 48fc63
 
Pablo Greco 48fc63
         h = use_pool ? mempool_alloc0_tile(hi->mempool) : malloc0(hi->head_size);
Pablo Greco 48fc63