lkml.org 
[lkml]   [2004]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] clarify message and give support contact for non-GPL modules
On Sat, May 01, 2004 at 03:47:15PM -0400, Nicolas Pitre wrote:
> On Sat, 1 May 2004, Marc Boucher wrote:
>
> > Let's deal with the root problem and fix the messages, as Rik van Riel
> > has suggested.
>
> Please do yourself and the rest of us a favor. Stop waiting and _do_ submit
> a patch yourself for precisely that root problem.
>
> That's what you should have done in the first place instead of being lazy,
> but it's not too late for Linuxant people to show they care about resolving
> this issue, and about the community they rely upon, as much as they care
> about their customers.

ok, please see tentative patch for 2.6 below, incorporating Rusty's change
to only emit the warning once, and Rik's suggestion to explicitly direct users
to the party responsible for support, if specified as
MODULE_AUTHOR("NAME <EMAIL>").

Constructive comments/improvements welcome.

Marc

--
Marc Boucher
Linuxant inc.

--- linux-2.6.6-rc3-bk3/kernel/module.c 2004-05-01 16:06:46.769778360 -0400
+++ linux-2.6.6-rc3-bk3-mb/kernel/module.c 2004-05-01 16:38:02.563614352 -0400
@@ -1125,15 +1125,18 @@
|| 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";

mod->license_gplok = license_is_gpl_compatible(license);
- if (!mod->license_gplok) {
- printk(KERN_WARNING "%s: module license '%s' taints kernel.\n",
- mod->name, license);
+ if (!mod->license_gplok && !(tainted & TAINT_PROPRIETARY_MODULE)) {
+ printk(KERN_INFO "%s: module has non-GPL license (%s).\n", mod->name, license);
+ if(author)
+ printk(KERN_INFO "%s: for any support issues, please contact %s\n", mod->name, author);
+ else
+ printk(KERN_INFO "%s: the Linux kernel community cannot resolve problems you may encounter when using this module.\n", mod->name);
tainted |= TAINT_PROPRIETARY_MODULE;
}
}
@@ -1470,7 +1473,9 @@
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,
-
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 14:02    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean