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 <[email protected]>
Attachment:
signature.asc
Description: This is a digitally signed message part
- References:
- 2.6.16-rc6-mm2
- From: Andrew Morton <[email protected]>
- 2.6.16-rc6-mm2
- Prev by Date: Re: broken local_t on i386
- Next by Date: Re: broken local_t on i386
- Previous by thread: Re: 2.6.16-rc6-mm2
- Next by thread: Re: 2.6.16-rc6-mm2
- Index(es):