X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=kernel%2Flockdep.c;h=7065a687ac546020de4d53883f188f9702e036fd;hb=97a572b3b877173e284c687be34d8ae81b826160;hp=8dc24c92dc6d2c1e867c8ce381caec43c9408583;hpb=db7ce76f6b3dfc119ab2f03e5e7784afc9cf2f05;p=powerpc.git diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 8dc24c92dc..7065a687ac 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -2742,6 +2742,10 @@ void debug_show_all_locks(void) int count = 10; int unlock = 1; + if (unlikely(!debug_locks)) { + printk("INFO: lockdep is turned off.\n"); + return; + } printk("\nShowing all locks held in the system:\n"); /* @@ -2785,6 +2789,10 @@ EXPORT_SYMBOL_GPL(debug_show_all_locks); void debug_show_held_locks(struct task_struct *task) { + if (unlikely(!debug_locks)) { + printk("INFO: lockdep is turned off.\n"); + return; + } lockdep_print_held_locks(task); }