lkml.org 
[lkml]   [2002]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: two 2.5 modules bugs
On Fri, Dec 27, 2002 at 05:16:35PM +0100, Mikael Pettersson wrote:
> 1. With kernel 2.5.53 and module-init-tools-0.9.6, "modprobe tulip"
> fails and goes into an infinite CPU-consuming loop. The problem
> appears to be related to the dependency from tulip to crc32. If I
> manually modprobe crc32 before modprobe tulip, it works. If crc32
> isn't loaded, modprobe tulip first loads crc32 and then loops.
>
> module-init-tools-0.9.5 did not have this problem.

Load modprobe with MALLOC_CHECK_=1. It will reveal that it tries to
free() some non-mallocated area.

Try patch below, insmod() can realloc/free its second argument, so
we can doublefree it, and glibc's malloc goes wild. It fixes problems
I had with modprobe ipx (which depends on psnap/p8022 which depends
on llc).

--- 0.9.6-1/modprobe.c.dist 2002-12-26 10:32:22.000000000 +0100
+++ 0.9.6-1/modprobe.c 2002-12-28 00:12:16.000000000 +0100
@@ -582,7 +582,7 @@
char *baseopts = NOFAIL(strdup(""));
insmod(list, baseopts, NULL, 0, dry_run, verbose, options,
commands, 0);
- free(baseopts);
+// free(baseopts);
}

/* Did config file override command or add options? */
Petr Vandrovec
vandrove@vc.cvut.cz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.279 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site