diff options
author | Andreas Schwab <schwab@redhat.com> | 2010-05-03 08:08:28 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-05-03 08:08:28 -0700 |
commit | 5a2a1d75043138e696222ced4560de2fb90b8024 (patch) | |
tree | 76c2da1388b8787ebabb9e61cf27d7510d1f5a7b /sysdeps/generic | |
parent | c739ec3d81a34a87d8ae1276eab4f5880afc3476 (diff) | |
download | glibc-5a2a1d75043138e696222ced4560de2fb90b8024.tar.gz glibc-5a2a1d75043138e696222ced4560de2fb90b8024.tar.xz glibc-5a2a1d75043138e696222ced4560de2fb90b8024.zip |
Don't deadlock in __dl_iterate_phdr while (un)loading objects.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index a14e8af92f..fcc943bce3 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; |