diff options
author | Dave Jones <davej@redhat.com> | 2013-04-23 12:34:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-04-26 02:36:33 -0400 |
commit | 199e371f59d31c828345b0d959d27d752827b517 (patch) | |
tree | 55d482c51276d98e2bcefba0b8460b48174f3e77 /kernel | |
parent | cc189d2513d1f45cde87a9043fe3be28559c7490 (diff) |
lockdep: Print out additional debugging advice when we hit lockdep BUGs
We occasionally get reports of these BUGs being hit, and the
stack trace doesn't necessarily always tell us what we need to
know about why we are hitting those limits.
If users start attaching /proc/lock_stats to reports we may have
more of a clue what's going on.
Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20130423163403.GA12839@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/lockdep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index e5deddadeab1..c5d1e6bbdb3e 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -411,6 +411,7 @@ static int save_trace(struct stack_trace *trace) | |||
411 | 411 | ||
412 | printk("BUG: MAX_STACK_TRACE_ENTRIES too low!\n"); | 412 | printk("BUG: MAX_STACK_TRACE_ENTRIES too low!\n"); |
413 | printk("turning off the locking correctness validator.\n"); | 413 | printk("turning off the locking correctness validator.\n"); |
414 | printk("Attach output of /proc/lock_stat to bug report\n"); | ||
414 | dump_stack(); | 415 | dump_stack(); |
415 | 416 | ||
416 | return 0; | 417 | return 0; |
@@ -765,6 +766,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) | |||
765 | 766 | ||
766 | printk("BUG: MAX_LOCKDEP_KEYS too low!\n"); | 767 | printk("BUG: MAX_LOCKDEP_KEYS too low!\n"); |
767 | printk("turning off the locking correctness validator.\n"); | 768 | printk("turning off the locking correctness validator.\n"); |
769 | printk("Attach output of /proc/lock_stat to bug report\n"); | ||
768 | dump_stack(); | 770 | dump_stack(); |
769 | return NULL; | 771 | return NULL; |
770 | } | 772 | } |
@@ -836,6 +838,7 @@ static struct lock_list *alloc_list_entry(void) | |||
836 | 838 | ||
837 | printk("BUG: MAX_LOCKDEP_ENTRIES too low!\n"); | 839 | printk("BUG: MAX_LOCKDEP_ENTRIES too low!\n"); |
838 | printk("turning off the locking correctness validator.\n"); | 840 | printk("turning off the locking correctness validator.\n"); |
841 | printk("Attach output of /proc/lock_stat to bug report\n"); | ||
839 | dump_stack(); | 842 | dump_stack(); |
840 | return NULL; | 843 | return NULL; |
841 | } | 844 | } |
@@ -2050,6 +2053,7 @@ cache_hit: | |||
2050 | 2053 | ||
2051 | printk("BUG: MAX_LOCKDEP_CHAINS too low!\n"); | 2054 | printk("BUG: MAX_LOCKDEP_CHAINS too low!\n"); |
2052 | printk("turning off the locking correctness validator.\n"); | 2055 | printk("turning off the locking correctness validator.\n"); |
2056 | printk("Attach output of /proc/lock_stat to bug report\n"); | ||
2053 | dump_stack(); | 2057 | dump_stack(); |
2054 | return 0; | 2058 | return 0; |
2055 | } | 2059 | } |
@@ -3191,6 +3195,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
3191 | printk("BUG: MAX_LOCK_DEPTH too low, depth: %i max: %lu!\n", | 3195 | printk("BUG: MAX_LOCK_DEPTH too low, depth: %i max: %lu!\n", |
3192 | curr->lockdep_depth, MAX_LOCK_DEPTH); | 3196 | curr->lockdep_depth, MAX_LOCK_DEPTH); |
3193 | printk("turning off the locking correctness validator.\n"); | 3197 | printk("turning off the locking correctness validator.\n"); |
3198 | printk("Attach output of /proc/lock_stat to bug report\n"); | ||
3194 | 3199 | ||
3195 | lockdep_print_held_locks(current); | 3200 | lockdep_print_held_locks(current); |
3196 | debug_show_all_locks(); | 3201 | debug_show_all_locks(); |