All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Darren Hart <dvhart@linux.intel.com>,
	Maarten Lankhorst <m.b.lankhorst@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: rt_mutex: restore wait_lock init in __rt_mutex_init
Date: Wed, 27 Jul 2011 01:18:31 -0700	[thread overview]
Message-ID: <1311754711-19577-1-git-send-email-dvhart@linux.intel.com> (raw)

Without the raw_spin_lock_init(), the wait_lock does not get properly
initialized with CONFIG_DEBUG_SPINLOCK. This can manifest in a BUG() in the
futex requeue_pi path when the pi_state->pi_mutex->wait_lock fails the magic
test in rt_mutex_start_proxy_lock()->raw_spin_lock(&lock->wait_lock).

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
CC: Maarten Lankhorst <m.b.lankhorst@gmail.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Steven Rostedt <rostedt@goodmis.org>

---
 rtmutex.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-3.0-rt/kernel/rtmutex.c
===================================================================
--- linux-3.0-rt.orig/kernel/rtmutex.c
+++ linux-3.0-rt/kernel/rtmutex.c
@@ -1277,6 +1277,7 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy);
 void __rt_mutex_init(struct rt_mutex *lock, const char *name)
 {
 	lock->owner = NULL;
+	raw_spin_lock_init(&lock->wait_lock);
 	plist_head_init_raw(&lock->wait_list, &lock->wait_lock);
 
 	debug_rt_mutex_init(lock, name);

             reply	other threads:[~2011-07-27  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27  8:18 Darren Hart [this message]
2011-07-27  9:37 ` rt_mutex: restore wait_lock init in __rt_mutex_init Thomas Gleixner
2011-07-27 14:34   ` Maarten Lankhorst
2011-07-27 15:43     ` Darren Hart

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=1311754711-19577-1-git-send-email-dvhart@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.b.lankhorst@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.