Re: 2.6.16-rc6-mm2

Zan Lynx
2006-06-12T16:56:29Z

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

On Fri, 2006-06-09 at 21:40 -0700, Andrew Morton wrote:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17-rc6/2.6.17-rc6-mm2/

I don't think I saw this bug caught by anyone yet. I was getting
segmentation faults in modpost while building out of tree modules. I'm
pretty sure the code should look like the following patch. Otherwise,
it makes modname look like "vmlinux\tEXPORT_SYMBOL" which then fails
badly later on.

--- linux/scripts/mod/modpost.c.orig 2006-06-12 10:21:10.000000000 -0600
+++ linux/scripts/mod/modpost.c 2006-06-12 10:16:01.000000000 -0600
@@ -1290,8 +1290,10 @@ static void read_dump(const char *fname,
goto fail;
*modname++ = '\0';
if (!(export = strchr(modname, '\t')))
- *export++ = '\0';
-
+ goto fail;
+ *export++ = '\0';
+ if (strchr(export, '\t'))
+ goto fail;
crc = strtoul(line, &d, 16);
if (*symname == '\0' || *modname == '\0' || *d != '\0')
goto fail;

--
Zan Lynx <zlynx@acm.org>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]