LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] lockdep: debug_locks check after check_chain_key
@ 2007-02-12 13:47 Jarek Poplawski
  0 siblings, 0 replies; only message in thread
From: Jarek Poplawski @ 2007-02-12 13:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar

In __lock_acquire check_chain_key can turn off
debug_locks, so check is needed to assure proper
return code.

Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>

---

diff -Nurp linux-2.6.20-git7-/kernel/lockdep.c linux-2.6.20-git7/kernel/lockdep.c
--- linux-2.6.20-git7-/kernel/lockdep.c	2007-02-12 13:13:15.000000000 +0100
+++ linux-2.6.20-git7/kernel/lockdep.c	2007-02-12 14:18:31.000000000 +0100
@@ -2228,6 +2228,10 @@ out_calc_hash:
 
 	curr->lockdep_depth++;
 	check_chain_key(curr);
+#ifdef CONFIG_DEBUG_LOCKDEP
+	if (unlikely(!debug_locks))
+		return 0;
+#endif
 	if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) {
 		debug_locks_off();
 		printk("BUG: MAX_LOCK_DEPTH too low!\n");

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

only message in thread, other threads:[~2007-02-12 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 13:47 [PATCH] lockdep: debug_locks check after check_chain_key Jarek Poplawski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).