The patch titled lockdep: handle chains involving classes defined in modules has been added to the -mm tree. Its filename is lockdep-handle-chains-involving-classes-defined-in-modules.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: lockdep: handle chains involving classes defined in modules From: Rabin Vincent <rabin@xxxxxx> /proc/lockdep_chains currently oopses after any module which creates and uses a lock is unloaded. This is because one of the chains involves a class which was defined in the module just unloaded. Solve this by marking the classes as unused and not printing information about the unused classes. Reported-by: Eric Sesterhenn <snakebyte@xxxxxx> Signed-off-by: Rabin Vincent <rabin@xxxxxx> Acked-by: Huang Ying <ying.huang@xxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/lockdep.c | 1 + kernel/lockdep_proc.c | 3 +++ 2 files changed, 4 insertions(+) diff -puN kernel/lockdep.c~lockdep-handle-chains-involving-classes-defined-in-modules kernel/lockdep.c --- a/kernel/lockdep.c~lockdep-handle-chains-involving-classes-defined-in-modules +++ a/kernel/lockdep.c @@ -3174,6 +3174,7 @@ static void zap_class(struct lock_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) diff -puN kernel/lockdep_proc.c~lockdep-handle-chains-involving-classes-defined-in-modules kernel/lockdep_proc.c --- a/kernel/lockdep_proc.c~lockdep-handle-chains-involving-classes-defined-in-modules +++ a/kernel/lockdep_proc.c @@ -201,6 +201,9 @@ static int lc_show(struct seq_file *m, 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"); _ Patches currently in -mm which might be from rabin@xxxxxx are origin.patch cpuidle-make-sysfs-attributes-sysdev-class-attributes.patch linux-next.patch lockdep-handle-chains-involving-classes-defined-in-modules.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html