Skip to content

Commit

Permalink
lockdep: add stack dumps to asserts
Browse files Browse the repository at this point in the history
Have a better idea about exactly which loc causes a lockdep
limit overflow. Often it's a bug or inefficiency in that
subsystem.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1237376327.5069.253.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Mar 31, 2009
1 parent 7f1e2ca commit eedeeab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)

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++;
Expand Down Expand Up @@ -855,6 +856,7 @@ static struct lock_list *alloc_list_entry(void)

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++;
Expand Down Expand Up @@ -1681,6 +1683,7 @@ static inline int lookup_chain_cache(struct task_struct *curr,

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++;
Expand Down Expand Up @@ -2540,6 +2543,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;
}

Expand Down Expand Up @@ -2636,6 +2640,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
debug_locks_off();
printk("BUG: MAX_LOCK_DEPTH too low!\n");
printk("turning off the locking correctness validator.\n");
dump_stack();
return 0;
}

Expand Down

0 comments on commit eedeeab

Please sign in to comment.