mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Brian Silverman <bsilver16384@gmail.com>
Cc: Austin Schuh <austin.linux@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Darren Hart <darren@dvhart.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] futex: fix a race condition between REQUEUE_PI and task death
Date: Sun, 26 Oct 2014 15:29:06 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1410261528270.5308@nanos> (raw)
In-Reply-To: <CAP01z6LmQfacDzrHmbW=hBGjn35qhMcNTTp8XhdM3DDnhoX9Xw@mail.gmail.com>

On Sat, 25 Oct 2014, Brian Silverman wrote:
> On Sat, 25 Oct 2014, Thomas Gleixner wrote:
> 
> > > pi_state_free and exit_pi_state_list both clean up futex_pi_state's.
> > > exit_pi_state_list takes the hb lock first, and most callers of
> > > pi_state_free do too. requeue_pi didn't, which causes lots of problems.
> >
> > "causes lots of problems" is not really a good explanation of the root
> > cause. That wants a proper description of the race, i.e.
> >
> > CPU 0              CPU 1
> > ...                ....
> >
> > I'm surely someone who is familiar with that code, but it took me
> > quite some time to understand whats going on. The casual reader will
> > just go into brain spiral mode and give up.
> 
> Thinking about it again, I'm no longer so sure that exit_pi_state_list is the
> only place that it can race against. However, I did catch that one with a
> particularly lucky crashdump, so I know it _can_ happen there. Is just
> giving an example for that good?

Sure. That immediately makes clear whats going on.

Thanks,

	tglx

  reply	other threads:[~2014-10-26 14:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 19:22 Brian Silverman
2014-10-23 19:28 ` Brian Silverman
2014-10-24  5:25   ` Mike Galbraith
2014-10-30  4:28   ` Darren Hart
2014-10-30  5:18     ` Mike Galbraith
2014-10-25 19:29 ` Thomas Gleixner
2014-10-26  0:19   ` Brian Silverman
2014-10-26 14:29     ` Thomas Gleixner [this message]
2014-10-26  0:20 ` [PATCH v2] " Brian Silverman
2014-10-26  6:22   ` Mike Galbraith
2014-10-26 14:45   ` Thomas Gleixner
2014-10-26 15:04   ` Thomas Gleixner
2014-10-26 15:22   ` [tip:locking/urgent] futex: Fix " tip-bot for Brian Silverman

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=alpine.DEB.2.11.1410261528270.5308@nanos \
    --to=tglx@linutronix.de \
    --cc=austin.linux@gmail.com \
    --cc=bsilver16384@gmail.com \
    --cc=darren@dvhart.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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®