public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: tglx@linutronix.de, laijs@cn.fujitsu.com, darren@dvhart.com,
	rostedt@goodmis.org, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] rtmutex: Permit rt_mutex_unlock() to be invoked with irqs disabled
Date: Sat, 23 Jul 2011 15:03:48 -0700	[thread overview]
Message-ID: <20110723220348.GD2415@linux.vnet.ibm.com> (raw)
In-Reply-To: <1311247968.29152.122.camel@twins>

On Thu, Jul 21, 2011 at 01:32:48PM +0200, Peter Zijlstra wrote:
> On Tue, 2011-07-19 at 13:14 -0700, Paul E. McKenney wrote:
> > Because rcu_read_unlock() can be invoked with interrupts disabled, it can
> > in turn invoke rt_mutex_unlock() with interrupts disabled.  This situation
> > results in lockdep splats (https://lkml.org/lkml/2011/7/7/362) because the
> > rt_mutex structure's ->lock_wait is acquired elsewhere without disabling
> > interrupts, which can result in deadlocks.
> > 
> > This commit therefore changes the rt_mutex structure's ->lock_wait
> > acquisitions to disable interrupts.
> > 
> > An alternative fix is to prohibit invoking rcu_read_unlock() with
> > interrupts disabled unless the entire preceding RCU read-side critical
> > section has run with interrupts disabled.  However, there is already
> > at least one case in mainline where this potential rule is violated,
> > and there might well be many more.  These would likely be found one at
> > a time using the lockdep-water-torture method, hence the alternative
> > fix in the form of this commit.
> 
> Thomas, I'm inclined to merge this, any objections?

FWIW, it has been passing tests here.

							Thanx, Paul

  reply	other threads:[~2011-07-23 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 20:14 [PATCH RFC] rtmutex: Permit rt_mutex_unlock() to be invoked with irqs disabled Paul E. McKenney
2011-07-21 11:32 ` Peter Zijlstra
2011-07-23 22:03   ` Paul E. McKenney [this message]
2011-07-23 23:20     ` Thomas Gleixner
2011-07-24  0:05       ` Thomas Gleixner
2011-07-24  5:17         ` Paul E. McKenney
2011-07-24  9:00           ` Thomas Gleixner
2011-07-24 15:56             ` Paul E. McKenney
2011-08-20  1:31               ` Arnaud Lacombe
2011-08-20 17:09                 ` Paul E. McKenney

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=20110723220348.GD2415@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=darren@dvhart.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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