This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #19329] Fix race between tls allocation at thread creation and dlopen


On 01/11/2016 11:32 AM, Szabolcs Nagy wrote:
> 2016-01-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
> 
>     [BZ #19329]
>     * elf/dl-open.c (dl_open_worker): Write GL(dl_tls_generation)
>     atomically.
>     * elf/dl-tls.c (_dl_allocate_tls_init): Read GL(dl_tls_generation),
>     GL(dl_tls_max_dtv_idx), slotinfo entries and listp->next atomically.
>     (_dl_add_to_slotinfo): Write the slotinfo entries and listp->next
>     atomically.

You are headed in the right direction. I like where this patch is going,
but don't have enough time to review this in detail yet.

At first glance your patch lacks sufficient concurrency documentation to
be acceptable. You need to document which acquires the releases
synchronizes-with. Please grep for "CONCURRENCY NOTES" to see the level
of detail we need to maintain these kinds of changes.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]