lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1311754711-19577-1-git-send-email-dvhart@linux.intel.com>
Date:	Wed, 27 Jul 2011 01:18:31 -0700
From:	Darren Hart <dvhart@...ux.intel.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc:	Darren Hart <dvhart@...ux.intel.com>,
	Maarten Lankhorst <m.b.lankhorst@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: rt_mutex: restore wait_lock init in __rt_mutex_init

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@...ux.intel.com>
Reported-by: Maarten Lankhorst <m.b.lankhorst@...il.com>
CC: Maarten Lankhorst <m.b.lankhorst@...il.com>
CC: Thomas Gleixner <tglx@...utronix.de>
CC: Steven Rostedt <rostedt@...dmis.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ