--- linux-2.6.5/kernel/module.c~ 2004-04-04 05:37:37.000000000 +0200 +++ linux-2.6.5/kernel/module.c 2004-04-27 01:24:14.000000000 +0200 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -1112,6 +1113,14 @@ } } +static inline int license_author_is_not_blacklisted(const char *author) +{ + /* LinuxAnt is known to ship non-GPL modules with license=="GPL" + to cheat on our checks. Stop them from doing that. */ + return !(strstr(author, "Linuxant") + || strstr(author, "Conexant")); +} + static inline int license_is_gpl_compatible(const char *license) { return (strcmp(license, "GPL") == 0 @@ -1121,12 +1130,16 @@ || strcmp(license, "Dual MPL/GPL") == 0); } -static void set_license(struct module *mod, const char *license) +static void set_license(struct module *mod, const char *license, + const char *author) { if (!license) license = "unspecified"; + if (!author) + author = "unspecified"; - mod->license_gplok = license_is_gpl_compatible(license); + mod->license_gplok = license_is_gpl_compatible(license) + && license_author_is_not_blacklisted(author); if (!mod->license_gplok) { printk(KERN_WARNING "%s: module license '%s' taints kernel.\n", mod->name, license); @@ -1466,7 +1479,8 @@ module_unload_init(mod); /* Set up license info based on the info section */ - set_license(mod, get_modinfo(sechdrs, infoindex, "license")); + set_license(mod, get_modinfo(sechdrs, infoindex, "license"), + get_modinfo(sechdrs, infoindex, "author")); /* Fix up syms, so that st_value is a pointer to location. */ err = simplify_symbols(sechdrs, symindex, strtab, versindex, pcpuindex,