aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2016-11-30 11:44:25 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-02-15 12:05:21 +0000
commitc54c412fe3313aee772cf1e8e0db11f8547726af (patch)
tree5720a9c551289f30841d34b84b140c8a8f55b844
parentf774573828499855b342793fca5cbad8c6814190 (diff)
downloadglibc-c54c412fe3313aee772cf1e8e0db11f8547726af.tar
glibc-c54c412fe3313aee772cf1e8e0db11f8547726af.tar.gz
glibc-c54c412fe3313aee772cf1e8e0db11f8547726af.tar.bz2
glibc-c54c412fe3313aee772cf1e8e0db11f8547726af.zip
elf: Fix comments and logic in _dl_add_to_slotinfo
Since commit a509eb117fac1d764b15eba64993f4bdb63d7f3c Avoid late dlopen failure due to scope, TLS slotinfo updates [BZ #25112] the generation counter update is not needed in the failure path.
-rw-r--r--elf/dl-tls.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 79b93ad91b..24d00c14ef 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -998,16 +998,7 @@ _dl_add_to_slotinfo (struct link_map *l, bool do_add)
+ TLS_SLOTINFO_SURPLUS * sizeof (struct dtv_slotinfo));
if (listp == NULL)
{
- /* We ran out of memory. We will simply fail this
- call but don't undo anything we did so far. The
- application will crash or be terminated anyway very
- soon. */
-
- /* We have to do this since some entries in the dtv
- slotinfo array might already point to this
- generation. */
- ++GL(dl_tls_generation);
-
+ /* We ran out of memory while resizing the dtv slotinfo list. */
_dl_signal_error (ENOMEM, "dlopen", NULL, N_("\
cannot create TLS data structures"));
}