summaryrefslogtreecommitdiff
path: root/scripts/mod
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2011-10-24 17:12:28 +0400
committerRusty Russell <rusty@rustcorp.com.au>2011-11-07 01:24:42 +0400
commit2449b8ba0745327c5fa49a8d9acffe03b2eded69 (patch)
tree48e11288635dcfc8cdb342f3ba00fa2a2a650aa8 /scripts/mod
parent1cd0d6c3021c8d76641b37203f504634b87fbabc (diff)
downloadlinux-2449b8ba0745327c5fa49a8d9acffe03b2eded69.tar.xz
module,bug: Add TAINT_OOT_MODULE flag for modules not built in-tree
Use of the GPL or a compatible licence doesn't necessarily make the code any good. We already consider staging modules to be suspect, and this should also be true for out-of-tree modules which may receive very little review. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Reviewed-by: Dave Jones <davej@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (patched oops-tracing.txt)
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/modpost.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index a509ff8f32fa..2bd594e6d1b4 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1849,6 +1849,12 @@ static void add_header(struct buffer *b, struct module *mod)
buf_printf(b, "};\n");
}
+static void add_intree_flag(struct buffer *b, int is_intree)
+{
+ if (is_intree)
+ buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n");
+}
+
static void add_staging_flag(struct buffer *b, const char *name)
{
static const char *staging_dir = "drivers/staging";
@@ -2169,6 +2175,7 @@ int main(int argc, char **argv)
buf.pos = 0;
add_header(&buf, mod);
+ add_intree_flag(&buf, !external_module);
add_staging_flag(&buf, mod->name);
err |= add_versions(&buf, mod);
add_depends(&buf, mod, modules);