mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ulrich Drepper" <drepper@gmail.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: "john stultz" <johnstul@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@elte.hu>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Sripathi Kodi" <sripathik@in.ibm.com>
Subject: Re: [BUG] futex_unlock_pi() hurts my brain and may cause application deadlock
Date: Thu, 31 May 2007 07:53:49 -0700	[thread overview]
Message-ID: <a36005b50705310753x2a09172boa6ceb63f9ca4d4b8@mail.gmail.com> (raw)
In-Reply-To: <1180574993.21781.22.camel@localhost.localdomain>

On 5/30/07, Steven Rostedt <rostedt@goodmis.org> wrote:
> >       if (!(uval & FUTEX_OWNER_DIED)) {
> >               pagefault_disable();
> >               uval = futex_atomic_cmpxchg_inatomic(uaddr, current->pid, 0);
> >               pagefault_enable();
> >       }
> [...]
> This code is in futex_unlock_pi.  Can the owner of the mutex really die?
> Isn't the owner the one doing the unlock?

This is part of the implementation of robust PI futexes.  The
semantics is that if the owner of a robust futex dies the futex is
marked with FUTEX_OWNER_DIED.  The next locking thread then has to
clear that bit before calling pthread_mutex_unlock.  If the bit is
still set while unlocking the mutex is permanently marked unusable.  I
cannot say right now whether this is the semantics implemented above.
I'll have to check the glibc test suite whether we check for that
semantic.

  reply	other threads:[~2007-05-31 14:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31  0:49 john stultz
2007-05-31  1:29 ` Steven Rostedt
2007-05-31 14:53   ` Ulrich Drepper [this message]
2007-05-31  2:52 ` [PATCH RT] fix faulting bomb in futex_unlock_pi64 Steven Rostedt
2007-05-31  3:18   ` Steven Rostedt
2007-05-31 17:20   ` Ulrich Drepper
2007-05-31 14:24 ` [BUG] futex_unlock_pi() hurts my brain and may cause application deadlock Ingo Molnar
2007-05-31 14:50   ` john stultz
2007-05-31 14:55     ` Ingo Molnar
2007-05-31 16:48       ` john stultz
2007-07-31 23:53 ` [RESEND] " john stultz
2007-08-01  0:00   ` Steven Rostedt
2007-08-01  1:41   ` David Miller
2007-08-06  7:20   ` Ingo Molnar

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=a36005b50705310753x2a09172boa6ceb63f9ca4d4b8@mail.gmail.com \
    --to=drepper@gmail.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=sripathik@in.ibm.com \
    --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

all inboxes | Powered by JetHome®