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] Have x86 and x86_64 lll_futex_wake return the syscall error.


On 05/24/2013 11:53 PM, Carlos O'Donell wrote:
It is very very possible that the futex syscall returns an
error and that the caller of lll_futex_wake may want to
look at that error and propagate the failure.

In the current i386 and x86-64 implementations of pthread_once
we don't currently check for a failure in lll_futex_wake
but we *should* for the sake of correctness and robustness.
It's this kind of problem which eventually results in
hard to track down bugs in the nptl code.

I first noticed this when I was testing removing the pthread_once
assembly implementation for x86 and x86_64 and looking at the
performance difference. Regardless of the results of that analysis,
which isn't done, and which Torvald is now initially tackling as the
pthread_once unification work[1], this is a good step forward.

This patch is a first step and ensures that a status is returned
for the lll_futex_wake call so we can detect failures.

No regressions in either x86 or x86-64.

OK to commit?

Yes, looks fine to me,

thanks,
Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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