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>] [day] [month] [year] [list]
Date:	Mon, 12 Feb 2007 14:47:53 +0100
From:	Jarek Poplawski <jarkao2@...pl>
To:	linux-kernel@...r.kernel.org
Cc:	Ingo Molnar <mingo@...e.hu>
Subject: [PATCH] lockdep: debug_locks check after check_chain_key

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@...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");
-
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