From: Darren Hart <dvhltc@us.ibm.com>
To: Chris Friesen <cfriesen@nortel.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
"lkml, " <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>,
Eric Dumazet <eric.dumazet@gmail.com>,
Dinakar Guniguntala <dino@in.ibm.com>,
"Stultz, John" <johnstul@us.ibm.com>
Subject: Re: [PATCH] RFC: futex: make futex_lock_pi interruptible
Date: Fri, 30 Oct 2009 17:31:16 -0700 [thread overview]
Message-ID: <4AEB8554.3050109@us.ibm.com> (raw)
In-Reply-To: <4AEB2885.5040406@nortel.com>
Chris Friesen wrote:
> On 10/29/2009 07:45 PM, Darren Hart wrote:
>
>> This appears to work fine. Can anyone think of a reason why this is an unsafe
>> thing to do? I'll have to create a much more elaborate test case and review
>> the glibc code of course to make sure the glibc mutex state isn't compromised.
>
> Setting aside the specific code details, I would suggest that you not
> review the glibc code but rather review the glibc documentation and the
> susv3/posix specifications. That way, if it behaves according to the
> spec but breaks glibc you can push for a patch to glibc.
>
> If it happens to work with current glibc but is not standards-compliant,
> then it could break in the future.
Unfortunately, pthread_mutex_lock() by spec shall not return -EINTR nor
is it a valid pthread_cancelation point. We can do the latter with a
non-posix extension in glibc. In order to provide an
interruptible/cancelable mutex, we would also be non-posix - at least,
if we provided a mechanism directly within glibc.
If folks think this signal based approach is the why to go, then you are
correct, we just need to make sure that the spec allows us to use
set/longjmp in this context.
--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team
prev parent reply other threads:[~2009-10-31 0:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 0:26 [PATCH] RFC: futex: make futex_lock_pi interruptible Darren Hart
2009-10-27 0:32 ` Darren Hart
2009-10-29 8:39 ` Arnd Bergmann
2009-10-30 1:19 ` Darren Hart
2009-10-30 1:45 ` Darren Hart
2009-10-30 9:13 ` Arnd Bergmann
2009-10-30 16:23 ` Darren Hart
2009-10-30 17:39 ` Arnd Bergmann
2009-10-30 17:55 ` Chris Friesen
2009-10-31 0:31 ` Darren Hart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AEB8554.3050109@us.ibm.com \
--to=dvhltc@us.ibm.com \
--cc=arnd@arndb.de \
--cc=cfriesen@nortel.com \
--cc=dino@in.ibm.com \
--cc=eric.dumazet@gmail.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox