summaryrefslogtreecommitdiff
path: root/elf/dl-support.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-05-03 08:08:28 -0700
committerUlrich Drepper <drepper@redhat.com>2010-05-03 08:08:28 -0700
commit5a2a1d75043138e696222ced4560de2fb90b8024 (patch)
tree76c2da1388b8787ebabb9e61cf27d7510d1f5a7b /elf/dl-support.c
parentc739ec3d81a34a87d8ae1276eab4f5880afc3476 (diff)
Don't deadlock in __dl_iterate_phdr while (un)loading objects.
Diffstat (limited to 'elf/dl-support.c')
-rw-r--r--elf/dl-support.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 65b25750de..f94d2c4c6e 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -166,6 +166,10 @@ const ElfW(Ehdr) *_dl_sysinfo_dso;
the loaded object might as well require a call to this function.
At this time it is not anymore a problem to modify the tables. */
__rtld_lock_define_initialized_recursive (, _dl_load_lock)
+/* This lock is used to keep __dl_iterate_phdr from inspecting the
+ list of loaded objects while an object is added to or removed from
+ that list. */
+__rtld_lock_define_initialized_recursive (, _dl_load_write_lock)
#ifdef HAVE_AUX_VECTOR