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. --- sysdeps/generic/ldsodefs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index a14e8af..fcc943b 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -416,6 +416,10 @@ struct rtld_global 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_recursive (EXTERN, _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_recursive (EXTERN, _dl_load_write_lock) /* Incremented whenever something may have been added to dl_loaded. */ EXTERN unsigned long long _dl_load_adds; -- cgit v1.1