This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH][BZ #19329] Fix race between tls allocation at thread creation and dlopen
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Cc: i dot palachev at samsung dot com, "triegel at redhat dot com" <triegel at redhat dot com>, nd at arm dot com
- Date: Tue, 12 Jan 2016 21:34:39 -0500
- Subject: Re: [PATCH][BZ #19329] Fix race between tls allocation at thread creation and dlopen
- Authentication-results: sourceware.org; auth=none
- References: <568D5E11 dot 3010301 at arm dot com> <5693D908 dot 8090104 at arm dot com>
On 01/11/2016 11:32 AM, Szabolcs Nagy wrote:
> 2016-01-11 Szabolcs Nagy <firstname.lastname@example.org>
> [BZ #19329]
> * elf/dl-open.c (dl_open_worker): Write GL(dl_tls_generation)
> * 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
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.