aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2006-10-02 05:17:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 10:57:12 -0400
commit2bc2d61a9638dab670d8361e928d1a5a291173ef (patch)
treef5d4cf9d3bac97f3da0bd5eb03e76797d47070cd /include/linux/module.h
parenta58cbd7c249f3079dd62d6391a33b9f43f2bfbef (diff)
[PATCH] list module taint flags in Oops/panic
When listing loaded modules during an oops or panic, also list each module's Tainted flags if non-zero (P: Proprietary or F: Forced load only). If a module is did not taint the kernel, it is just listed like usbcore but if it did taint the kernel, it is listed like wizmodem(PF) Example: [ 3260.121718] Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: [ 3260.121729] [<ffffffff8804c099>] :dump_test:proc_dump_test+0x99/0xc8 [ 3260.121742] PGD fe8d067 PUD 264a6067 PMD 0 [ 3260.121748] Oops: 0002 [1] SMP [ 3260.121753] CPU 1 [ 3260.121756] Modules linked in: dump_test(P) snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device ide_cd generic ohci1394 snd_hda_intel snd_hda_codec snd_pcm snd_timer snd ieee1394 snd_page_alloc piix ide_core arcmsr aic79xx scsi_transport_spi usblp [ 3260.121785] Pid: 5556, comm: bash Tainted: P 2.6.18-git10 #1 [Alternatively, I can look into listing tainted flags with 'lsmod', but that won't help in oopsen/panics so much.] [akpm@osdl.org: cleanup] Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 2c599175c583..4b2d8091a410 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -320,6 +320,8 @@ struct module
320 /* Am I GPL-compatible */ 320 /* Am I GPL-compatible */
321 int license_gplok; 321 int license_gplok;
322 322
323 unsigned int taints; /* same bits as kernel:tainted */
324
323#ifdef CONFIG_MODULE_UNLOAD 325#ifdef CONFIG_MODULE_UNLOAD
324 /* Reference counts */ 326 /* Reference counts */
325 struct module_ref ref[NR_CPUS]; 327 struct module_ref ref[NR_CPUS];