summary refs log tree commit diff
path: root/elf/tlsdeschtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'elf/tlsdeschtab.h')
-rw-r--r--elf/tlsdeschtab.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/tlsdeschtab.h b/elf/tlsdeschtab.h
index 155f4fdd9b..8ce8249b92 100644
--- a/elf/tlsdeschtab.h
+++ b/elf/tlsdeschtab.h
@@ -102,6 +102,12 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset)
   test.tlsinfo.ti_module = map->l_tls_modid;
   test.tlsinfo.ti_offset = ti_offset;
   entry = htab_find_slot (ht, &test, 1, hash_tlsdesc, eq_tlsdesc);
+  if (! entry)
+    {
+      __rtld_lock_unlock_recursive (GL(dl_load_lock));
+      return 0;
+    }
+
   if (*entry)
     {
       td = *entry;