aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-05-01 00:24:54 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-05-01 00:24:54 -0400
commitbc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch)
tree427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /kernel/lockdep.c
parent3d29cdff999c37b3876082278a8134a0642a02cd (diff)
parentdc87c3985e9b442c60994308a96f887579addc39 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/usb/input/Makefile drivers/usb/input/gtco.c
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 592c576d77a7..7065a687ac54 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2228,6 +2228,10 @@ out_calc_hash:
2228 2228
2229 curr->lockdep_depth++; 2229 curr->lockdep_depth++;
2230 check_chain_key(curr); 2230 check_chain_key(curr);
2231#ifdef CONFIG_DEBUG_LOCKDEP
2232 if (unlikely(!debug_locks))
2233 return 0;
2234#endif
2231 if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) { 2235 if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) {
2232 debug_locks_off(); 2236 debug_locks_off();
2233 printk("BUG: MAX_LOCK_DEPTH too low!\n"); 2237 printk("BUG: MAX_LOCK_DEPTH too low!\n");
@@ -2598,7 +2602,7 @@ out_restore:
2598 raw_local_irq_restore(flags); 2602 raw_local_irq_restore(flags);
2599} 2603}
2600 2604
2601void __init lockdep_init(void) 2605void lockdep_init(void)
2602{ 2606{
2603 int i; 2607 int i;
2604 2608
@@ -2738,6 +2742,10 @@ void debug_show_all_locks(void)
2738 int count = 10; 2742 int count = 10;
2739 int unlock = 1; 2743 int unlock = 1;
2740 2744
2745 if (unlikely(!debug_locks)) {
2746 printk("INFO: lockdep is turned off.\n");
2747 return;
2748 }
2741 printk("\nShowing all locks held in the system:\n"); 2749 printk("\nShowing all locks held in the system:\n");
2742 2750
2743 /* 2751 /*
@@ -2781,6 +2789,10 @@ EXPORT_SYMBOL_GPL(debug_show_all_locks);
2781 2789
2782void debug_show_held_locks(struct task_struct *task) 2790void debug_show_held_locks(struct task_struct *task)
2783{ 2791{
2792 if (unlikely(!debug_locks)) {
2793 printk("INFO: lockdep is turned off.\n");
2794 return;
2795 }
2784 lockdep_print_held_locks(task); 2796 lockdep_print_held_locks(task);
2785} 2797}
2786 2798