Bug#4740: Modules-2.0.0 fails to load modules in kernel 2.1.x
Package: modules
Version: 2.0.0-8
Insmod fails to load modules with kernels 2.1.x. This failure has to do
with large addresses being concidered an error. The following patch fixed
it for me:
modules-2.0.0/insmod/insmod.c:
/* We add "sizeof (int)" to skip over the use count */
addr = create_module(modname, progsize) + sizeof (int);
+
+ /* the preceding may fail since the address in the kernel space
+ * may be greater than 2G. Then addr = -1 and errno = -(realaddr).
+ * We'll check for that and correct. Boy I hope errno and addr
+ * are the same size.
+ * Note: this means we can't use the last page in virtual memory.
+ */
+ if( errno > 4095 ) {
+ addr = sizeof(int)-errno; /* reverse the math from create_module */
+ errno = 0;
+ /* insmod_error ("Address wrap bug: %lx", addr); */
+ }
+
switch (errno) {
case EEXIST:
insmod_error ("A module named %s already exists", modname);
exit(2);
Luck,
Dwarf
------------ --------------
aka Dale Scheetz Phone: 1 (904) 877-0257
Flexible Software Fax: NONE
Black Creek Critters e-mail: dwarf@polaris.net
------------ If you don't see what you want, just ask --------------
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: