Subject: Re: next-20090211: BUG: MAX_LOCKDEP_SUBCLASSES too low!

From: Peter Zijlstra <[email-masked]>
Date: Wed, 11 Feb 2009 13:26:41 +0100

On Wed, 2009-02-11 at 13:24 +0100, Peter Zijlstra wrote:
> On Wed, 2009-02-11 at 13:23 +0100, Peter Zijlstra wrote:
> > On Wed, 2009-02-11 at 15:14 +0300, Alexander Beregalov wrote:
> > > Hi
> > > 
> > > Full dmesg is attached.
> > > 
> > > Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
> > > .... MAX_LOCKDEP_SUBCLASSES:  8
> > > .... MAX_LOCK_DEPTH:          48
> > > .... MAX_LOCKDEP_KEYS:        8191
> > > .... CLASSHASH_SIZE:          4096
> > > .... MAX_LOCKDEP_ENTRIES:     8192
> > > .... MAX_LOCKDEP_CHAINS:      16384
> > > .... CHAINHASH_SIZE:          8192
> > >  memory used by lock dependency info: 4351 kB
> > >  per task-struct memory footprint: 2688 bytes
> > > <..>
> > > BUG: MAX_LOCKDEP_SUBCLASSES too low!
> > > turning off the locking correctness validator.
> > 
> > Is this an allyesconfig or something other massive bloated?
> 
> Sorry, not playing attention, its SUB classes.. let me look at that,
> that smells like a rotten annotation.

Could you run with the below patch, so that we can see where this
happens?

---
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 06b0c35..4fe272c 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2542,6 +2542,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;
 	}