From: Amerigo Wang <amwang@redhat.com> Date: Tue, 15 Dec 2009 09:38:44 -0500 Subject: [misc] lockdep: dump stack when hitting a limit Message-id: <20091215094148.4709.20450.sendpatchset@localhost.localdomain> Patchwork-id: 21936 O-Subject: [PATCH RHEL5.x] lockdep: dump stack when hitting a limit Bugzilla: 546554 RH-Acked-by: Dean Nelson <dnelson@redhat.com> BZ: https://bugzilla.redhat.com/show_bug.cgi?id=546554 Description: Dump the stack when we hit a lockdep limit, or we don't know what was happening. This is a straight backport of upstream commit eedeeabd. Signed-off-by: WANG Cong <amwang@redhat.com> diff --git a/kernel/lockdep.c b/kernel/lockdep.c index b9b014c..2b63d9a 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -84,6 +84,7 @@ static struct lock_list *alloc_list_entry(void) debug_locks_off(); printk("BUG: MAX_LOCKDEP_ENTRIES too low!\n"); printk("turning off the locking correctness validator.\n"); + dump_stack(); return NULL; } return list_entries + nr_list_entries++; @@ -1444,6 +1445,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) debug_locks_off(); printk("BUG: MAX_LOCKDEP_KEYS too low!\n"); printk("turning off the locking correctness validator.\n"); + dump_stack(); return NULL; } class = lock_classes + nr_lock_classes++; @@ -1531,6 +1533,7 @@ cache_hit: debug_locks_off(); printk("BUG: MAX_LOCKDEP_CHAINS too low!\n"); printk("turning off the locking correctness validator.\n"); + dump_stack(); return 0; } chain = lock_chains + nr_lock_chains++; @@ -2220,6 +2223,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, debug_locks_off(); printk("BUG: MAX_LOCKDEP_SUBCLASSES too low!\n"); printk("turning off the locking correctness validator.\n"); + dump_stack(); return 0; } @@ -2414,6 +2418,7 @@ out_calc_hash: debug_locks_off(); printk("BUG: MAX_LOCK_DEPTH too low!\n"); printk("turning off the locking correctness validator.\n"); + dump_stack(); return 0; } if (unlikely(curr->lockdep_depth > max_lockdep_depth))