diff options
author | Roland McGrath <roland@redhat.com> | 2010-05-04 12:13:28 -0700 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2010-05-04 12:13:28 -0700 |
commit | bb6d7d23841e57fde2c6c79a4455c7e9373a5d1b (patch) | |
tree | 334c4a5d9b11045021021f5f0db53ce4f4fa3ff3 /elf/dl-close.c | |
parent | 2e76ab2332a7fb9e73a4047625b915bff93bd427 (diff) | |
parent | c4ccff16e2ff92f84102988bd3a32cd1d2719f3a (diff) |
Merge commit 'origin/master' into fedora/master
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r-- | elf/dl-close.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c index b73a7adb1a..700e765c3c 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -507,6 +507,9 @@ _dl_close_worker (struct link_map *map) size_t tls_free_end; tls_free_start = tls_free_end = NO_TLS_OFFSET; + /* We modify the list of loaded objects. */ + __rtld_lock_lock_recursive (GL(dl_load_write_lock)); + /* Check each element of the search list to see if all references to it are gone. */ for (unsigned int i = first_loaded; i < nloaded; ++i) @@ -665,6 +668,8 @@ _dl_close_worker (struct link_map *map) } } + __rtld_lock_unlock_recursive (GL(dl_load_write_lock)); + /* If we removed any object which uses TLS bump the generation counter. */ if (any_tls) { |