]> err.no Git - linux-2.6/commitdiff
lockdep: handle chains involving classes defined in modules
authorRabin Vincent <rabin@rab.in>
Mon, 11 Aug 2008 07:30:26 +0000 (09:30 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 11 Aug 2008 07:30:26 +0000 (09:30 +0200)
Solve this by marking the classes as unused and not printing information
about the unused classes.

Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/lockdep.c
kernel/lockdep_proc.c

index 410c3365ad8f78f25bd81148f860eda31f9a02dd..ab933fecd2a181fa245ec72e5303dbfc256e5dbd 100644 (file)
@@ -3176,6 +3176,7 @@ static void zap_class(struct lock_class *class)
        list_del_rcu(&class->hash_entry);
        list_del_rcu(&class->lock_entry);
 
+       class->key = NULL;
 }
 
 static inline int within(const void *addr, void *start, unsigned long size)
index 6252ff799d19c35237023362239a04789e80e576..fa19aee604c28233822701ac5f86bcb288ffe239 100644 (file)
@@ -201,6 +201,9 @@ static int lc_show(struct seq_file *m, void *v)
 
        for (i = 0; i < chain->depth; i++) {
                class = lock_chain_get_class(chain, i);
+               if (!class->key)
+                       continue;
+
                seq_printf(m, "[%p] ", class->key);
                print_name(m, class);
                seq_puts(m, "\n");