aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/lockdep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 8dc24c92dc6d..7065a687ac54 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2742,6 +2742,10 @@ void debug_show_all_locks(void)
2742 int count = 10; 2742 int count = 10;
2743 int unlock = 1; 2743 int unlock = 1;
2744 2744
2745 if (unlikely(!debug_locks)) {
2746 printk("INFO: lockdep is turned off.\n");
2747 return;
2748 }
2745 printk("\nShowing all locks held in the system:\n"); 2749 printk("\nShowing all locks held in the system:\n");
2746 2750
2747 /* 2751 /*
@@ -2785,6 +2789,10 @@ EXPORT_SYMBOL_GPL(debug_show_all_locks);
2785 2789
2786void debug_show_held_locks(struct task_struct *task) 2790void debug_show_held_locks(struct task_struct *task)
2787{ 2791{
2792 if (unlikely(!debug_locks)) {
2793 printk("INFO: lockdep is turned off.\n");
2794 return;
2795 }
2788 lockdep_print_held_locks(task); 2796 lockdep_print_held_locks(task);
2789} 2797}
2790 2798