public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* (no subject)
@ 2011-07-27  8:17 Darren Hart
  0 siblings, 0 replies; only message in thread
From: Darren Hart @ 2011-07-27  8:17 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Darren Hart, Maarten Lankhorst, Thomas Gleixner, Steven Rostedt

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-27  8:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-27  8:17 Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox