From 5a2a1d75043138e696222ced4560de2fb90b8024 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 3 May 2010 08:08:28 -0700 Subject: Don't deadlock in __dl_iterate_phdr while (un)loading objects. --- elf/dl-support.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'elf/dl-support.c') 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 -- cgit v1.2.1