aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/smpboot.c2
-rw-r--r--arch/x86_64/kernel/mce.c2
-rw-r--r--kernel/module.c11
-rw-r--r--mm/page_alloc.c3
4 files changed, 10 insertions, 8 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index c70cd2a0830..5f0a95d76a4 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -202,7 +202,7 @@ static void __devinit smp_store_cpu_info(int id)
202 goto valid_k7; 202 goto valid_k7;
203 203
204 /* If we get here, it's not a certified SMP capable AMD system. */ 204 /* If we get here, it's not a certified SMP capable AMD system. */
205 tainted |= TAINT_UNSAFE_SMP; 205 add_taint(TAINT_UNSAFE_SMP);
206 } 206 }
207 207
208valid_k7: 208valid_k7:
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
index 969365c0771..08203b07f4b 100644
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -217,7 +217,7 @@ void do_machine_check(struct pt_regs * regs, long error_code)
217 panicm_found = 1; 217 panicm_found = 1;
218 } 218 }
219 219
220 tainted |= TAINT_MACHINE_CHECK; 220 add_taint(TAINT_MACHINE_CHECK);
221 } 221 }
222 222
223 /* Never do anything final in the polling timer */ 223 /* Never do anything final in the polling timer */
diff --git a/kernel/module.c b/kernel/module.c
index 4b39d3793c7..ff5c500ab62 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -20,6 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/moduleloader.h> 21#include <linux/moduleloader.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/kernel.h>
23#include <linux/slab.h> 24#include <linux/slab.h>
24#include <linux/vmalloc.h> 25#include <linux/vmalloc.h>
25#include <linux/elf.h> 26#include <linux/elf.h>
@@ -498,7 +499,7 @@ static inline int try_force(unsigned int flags)
498{ 499{
499 int ret = (flags & O_TRUNC); 500 int ret = (flags & O_TRUNC);
500 if (ret) 501 if (ret)
501 tainted |= TAINT_FORCED_MODULE; 502 add_taint(TAINT_FORCED_MODULE);
502 return ret; 503 return ret;
503} 504}
504#else 505#else
@@ -897,7 +898,7 @@ static int check_version(Elf_Shdr *sechdrs,
897 if (!(tainted & TAINT_FORCED_MODULE)) { 898 if (!(tainted & TAINT_FORCED_MODULE)) {
898 printk("%s: no version for \"%s\" found: kernel tainted.\n", 899 printk("%s: no version for \"%s\" found: kernel tainted.\n",
899 mod->name, symname); 900 mod->name, symname);
900 tainted |= TAINT_FORCED_MODULE; 901 add_taint(TAINT_FORCED_MODULE);
901 } 902 }
902 return 1; 903 return 1;
903} 904}
@@ -1352,7 +1353,7 @@ static void set_license(struct module *mod, const char *license)
1352 if (!mod->license_gplok && !(tainted & TAINT_PROPRIETARY_MODULE)) { 1353 if (!mod->license_gplok && !(tainted & TAINT_PROPRIETARY_MODULE)) {
1353 printk(KERN_WARNING "%s: module license '%s' taints kernel.\n", 1354 printk(KERN_WARNING "%s: module license '%s' taints kernel.\n",
1354 mod->name, license); 1355 mod->name, license);
1355 tainted |= TAINT_PROPRIETARY_MODULE; 1356 add_taint(TAINT_PROPRIETARY_MODULE);
1356 } 1357 }
1357} 1358}
1358 1359
@@ -1610,7 +1611,7 @@ static struct module *load_module(void __user *umod,
1610 modmagic = get_modinfo(sechdrs, infoindex, "vermagic"); 1611 modmagic = get_modinfo(sechdrs, infoindex, "vermagic");
1611 /* This is allowed: modprobe --force will invalidate it. */ 1612 /* This is allowed: modprobe --force will invalidate it. */
1612 if (!modmagic) { 1613 if (!modmagic) {
1613 tainted |= TAINT_FORCED_MODULE; 1614 add_taint(TAINT_FORCED_MODULE);
1614 printk(KERN_WARNING "%s: no version magic, tainting kernel.\n", 1615 printk(KERN_WARNING "%s: no version magic, tainting kernel.\n",
1615 mod->name); 1616 mod->name);
1616 } else if (!same_magic(modmagic, vermagic)) { 1617 } else if (!same_magic(modmagic, vermagic)) {
@@ -1739,7 +1740,7 @@ static struct module *load_module(void __user *umod,
1739 (mod->num_gpl_syms && !gplcrcindex)) { 1740 (mod->num_gpl_syms && !gplcrcindex)) {
1740 printk(KERN_WARNING "%s: No versions for exported symbols." 1741 printk(KERN_WARNING "%s: No versions for exported symbols."
1741 " Tainting kernel.\n", mod->name); 1742 " Tainting kernel.\n", mod->name);
1742 tainted |= TAINT_FORCED_MODULE; 1743 add_taint(TAINT_FORCED_MODULE);
1743 } 1744 }
1744#endif 1745#endif
1745 1746
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c5823c395f7..ae2903339e7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -22,6 +22,7 @@
22#include <linux/pagemap.h> 22#include <linux/pagemap.h>
23#include <linux/bootmem.h> 23#include <linux/bootmem.h>
24#include <linux/compiler.h> 24#include <linux/compiler.h>
25#include <linux/kernel.h>
25#include <linux/module.h> 26#include <linux/module.h>
26#include <linux/suspend.h> 27#include <linux/suspend.h>
27#include <linux/pagevec.h> 28#include <linux/pagevec.h>
@@ -117,7 +118,7 @@ static void bad_page(const char *function, struct page *page)
117 set_page_count(page, 0); 118 set_page_count(page, 0);
118 reset_page_mapcount(page); 119 reset_page_mapcount(page);
119 page->mapping = NULL; 120 page->mapping = NULL;
120 tainted |= TAINT_BAD_PAGE; 121 add_taint(TAINT_BAD_PAGE);
121} 122}
122 123
123#ifndef CONFIG_HUGETLB_PAGE 124#ifndef CONFIG_HUGETLB_PAGE