ksyms.c bug - non-scsi block devices in scsi systems

Grant R. Guenther (grant@gear.torque.net)
Sun, 19 May 1996 13:00:43 -0400 (EDT)


Hi Linus

I think someone else has complained about this, but I haven't seen an
answer.

In ksyms.c the following occurs:

#ifndef CONFIG_SCSI
/*
* With no scsi configured, we still need to export a few
* symbols so that scsi can be loaded later via insmod.
* Don't remove this unless you are 100% sure of what you are
* doing. If you want to remove this, you don't know what
* you are doing!
*/
X(gendisk_head),
X(resetup_one_dev),
#endif

Why is this #ifndef there at all ? I think those symbols should always
be available. I believe I saw that someone had recently modularised the
XD driver - but if CONFIG_SCSI *is* defined, it won't be loadable.

I'm working on a driver that requires these symbols. I was
surprised that it wouldn't load into a system that also had SCSI
support built in.

Also, I think these symbols should be located with the other block driver
support.

Here's a patch (against pre2.0.6) to fix all this:

--- linux.ref/kernel/ksyms.c Mon May 13 00:17:23 1996
+++ linux/kernel/ksyms.c Sun May 19 12:53:29 1996
@@ -198,6 +198,9 @@
X(get_blkfops),
X(blkdev_open),
X(blkdev_release),
+ X(gendisk_head),
+ X(resetup_one_dev),
+
#ifdef CONFIG_SERIAL
/* Module creation of serial units */
X(register_serial),
@@ -310,17 +313,6 @@
/* Miscellaneous access points */
X(si_meminfo),

-#ifndef CONFIG_SCSI
- /*
- * With no scsi configured, we still need to export a few
- * symbols so that scsi can be loaded later via insmod.
- * Don't remove this unless you are 100% sure of what you are
- * doing. If you want to remove this, you don't know what
- * you are doing!
- */
- X(gendisk_head),
- X(resetup_one_dev),
-#endif
/* Added to make file system as module */
X(set_writetime),
X(sys_tz),

--------------------------------------------------------------------------
Grant R. Guenther grant@torque.net
--------------------------------------------------------------------------