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 <[EMAIL PROTECTED]>

---

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");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to