elf: Fix comments and logic in _dl_add_to_slotinfo
commitc489c35054c39d7f2437ca61b369e3ede448f022
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 30 Nov 2016 11:44:25 +0000 (30 11:44 +0000)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 15 Apr 2021 08:30:43 +0000 (15 09:30 +0100)
treeceaf096243377db9cd2b504f4dbf2c5ce43ed3af
parent8f85075a2e9c26ff7486d4bbaf358999807d215c
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.
That commit ensures allocation in _dl_add_to_slotinfo happens before
the demarcation point in dlopen (it is called twice, first time is for
allocation only where dlopen can still be reverted on failure, then
second time actual dtv updates are done which then cannot fail).

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/dl-tls.c