diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-20 18:06:15 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-20 18:06:15 -0400 |
commit | d1a7fddf420b1f5a7d9a899b3388026084a67d33 (patch) | |
tree | 7044a8b9a1b6fadc7b027d4a82840c084b0c8012 /kernel/module.c | |
parent | 778c4c821779bb7eef7f5a1eea4d15d05d976f8b (diff) | |
parent | c0e1936338a11ea252d11370ff62e40db334f646 (diff) |
Merge branch 'for-rmk' of git://git.marvell.com/orion into devel
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index b7205f67cfaf..25bc9ac9e226 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1834,6 +1834,7 @@ static noinline struct module *load_module(void __user *umod, | |||
1834 | Elf_Ehdr *hdr; | 1834 | Elf_Ehdr *hdr; |
1835 | Elf_Shdr *sechdrs; | 1835 | Elf_Shdr *sechdrs; |
1836 | char *secstrings, *args, *modmagic, *strtab = NULL; | 1836 | char *secstrings, *args, *modmagic, *strtab = NULL; |
1837 | char *staging; | ||
1837 | unsigned int i; | 1838 | unsigned int i; |
1838 | unsigned int symindex = 0; | 1839 | unsigned int symindex = 0; |
1839 | unsigned int strindex = 0; | 1840 | unsigned int strindex = 0; |
@@ -1989,6 +1990,14 @@ static noinline struct module *load_module(void __user *umod, | |||
1989 | goto free_hdr; | 1990 | goto free_hdr; |
1990 | } | 1991 | } |
1991 | 1992 | ||
1993 | staging = get_modinfo(sechdrs, infoindex, "staging"); | ||
1994 | if (staging) { | ||
1995 | add_taint_module(mod, TAINT_CRAP); | ||
1996 | printk(KERN_WARNING "%s: module is from the staging directory," | ||
1997 | " the quality is unknown, you have been warned.\n", | ||
1998 | mod->name); | ||
1999 | } | ||
2000 | |||
1992 | /* Now copy in args */ | 2001 | /* Now copy in args */ |
1993 | args = strndup_user(uargs, ~0UL >> 1); | 2002 | args = strndup_user(uargs, ~0UL >> 1); |
1994 | if (IS_ERR(args)) { | 2003 | if (IS_ERR(args)) { |
@@ -2587,6 +2596,8 @@ static char *module_flags(struct module *mod, char *buf) | |||
2587 | buf[bx++] = 'P'; | 2596 | buf[bx++] = 'P'; |
2588 | if (mod->taints & (1 << TAINT_FORCED_MODULE)) | 2597 | if (mod->taints & (1 << TAINT_FORCED_MODULE)) |
2589 | buf[bx++] = 'F'; | 2598 | buf[bx++] = 'F'; |
2599 | if (mod->taints & (1 << TAINT_CRAP)) | ||
2600 | buf[bx++] = 'C'; | ||
2590 | /* | 2601 | /* |
2591 | * TAINT_FORCED_RMMOD: could be added. | 2602 | * TAINT_FORCED_RMMOD: could be added. |
2592 | * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't | 2603 | * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't |