[PATCH][BZ #19329] Fix race between tls allocation at thread creation and dlopen
Torvald Riegel
triegel@redhat.com
Thu Jan 21 21:42:00 GMT 2016
On Wed, 2016-01-20 at 15:09 -0500, Carlos O'Donell wrote:
> Everything we do should be incremental. At each step though we
> might ask ourselves: How do we solve the more global problem
> of getting rid of the load lock?
IMO we should ask that. A better question would probably be to ask why
we need the load lock; the lock is just a tool to implement some
intended high-level synchronization scheme. We want to agree on this
scheme early on, otherwise it will be hard to judge correctness.
Note that it can be a perfectly fine approach to simply want to
implement the atomicity and ordering provided by some critical sections
differently -- but in this specific case, it sounds as if we'd like to
have a lock-less scheme anyway, and the current scheme doesn't work or
is not implemented correctly. Both hint that we should go up in layers
of abstraction and revisit what we actually want.
More information about the Libc-alpha
mailing list