diff options
author | Andrew Morton <akpm@osdl.org> | 2004-05-14 20:23:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-14 20:23:01 -0700 |
commit | 22e1c5c4e32614bb23a817ea53b4fa4842803d21 (patch) | |
tree | 7a17e1d51a1b5004ecb64871ce14900b979a2278 /kernel | |
parent | d0980c12bbb794fdfef4fb0f82e08e2e94905daf (diff) | |
download | history-22e1c5c4e32614bb23a817ea53b4fa4842803d21.tar.gz |
[PATCH] implement print_modules()
From: Arjan van de Ven <arjanv@redhat.com>,
Rusty Russell <rusty@rustcorp.com.au>
The patch below resolves the "Not Yet Implemented" print_modules() thing.
This is a really useful feature for distros; it allows us to do statistical
analysis on which modules are present how often in oopses compared to how
often they are used normally. In addition it helps to spot candidates for
certain bugs without having to go back to the customer asking for this
information.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index 1781faa9a13238..e7a73bac2d58a4 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2040,6 +2040,17 @@ struct module *module_text_address(unsigned long addr) return NULL; } +/* Don't grab lock, we're oopsing. */ +void print_modules(void) +{ + struct module *mod; + + printk("Modules linked in:"); + list_for_each_entry(mod, &modules, list) + printk(" %s", mod->name); + printk("\n"); +} + #ifdef CONFIG_MODVERSIONS /* Generate the signature for struct module here, too, for modversions. */ void struct_module(struct module *mod) { return; } |