diff options
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/module.c b/kernel/module.c index 9db11911e04b..dd9ac6ad5cb9 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -100,7 +100,7 @@ static inline int strong_try_module_get(struct module *mod) | |||
100 | static inline void add_taint_module(struct module *mod, unsigned flag) | 100 | static inline void add_taint_module(struct module *mod, unsigned flag) |
101 | { | 101 | { |
102 | add_taint(flag); | 102 | add_taint(flag); |
103 | mod->taints |= flag; | 103 | mod->taints |= (1U << flag); |
104 | } | 104 | } |
105 | 105 | ||
106 | /* | 106 | /* |
@@ -923,7 +923,7 @@ static const char vermagic[] = VERMAGIC_STRING; | |||
923 | static int try_to_force_load(struct module *mod, const char *symname) | 923 | static int try_to_force_load(struct module *mod, const char *symname) |
924 | { | 924 | { |
925 | #ifdef CONFIG_MODULE_FORCE_LOAD | 925 | #ifdef CONFIG_MODULE_FORCE_LOAD |
926 | if (!(tainted & TAINT_FORCED_MODULE)) | 926 | if (!test_taint(TAINT_FORCED_MODULE)) |
927 | printk("%s: no version for \"%s\" found: kernel tainted.\n", | 927 | printk("%s: no version for \"%s\" found: kernel tainted.\n", |
928 | mod->name, symname); | 928 | mod->name, symname); |
929 | add_taint_module(mod, TAINT_FORCED_MODULE); | 929 | add_taint_module(mod, TAINT_FORCED_MODULE); |
@@ -1033,7 +1033,7 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs, | |||
1033 | const unsigned long *crc; | 1033 | const unsigned long *crc; |
1034 | 1034 | ||
1035 | ret = find_symbol(name, &owner, &crc, | 1035 | ret = find_symbol(name, &owner, &crc, |
1036 | !(mod->taints & TAINT_PROPRIETARY_MODULE), true); | 1036 | !(mod->taints & (1 << TAINT_PROPRIETARY_MODULE)), true); |
1037 | if (!IS_ERR_VALUE(ret)) { | 1037 | if (!IS_ERR_VALUE(ret)) { |
1038 | /* use_module can fail due to OOM, | 1038 | /* use_module can fail due to OOM, |
1039 | or module initialization or unloading */ | 1039 | or module initialization or unloading */ |
@@ -1634,7 +1634,7 @@ static void set_license(struct module *mod, const char *license) | |||
1634 | license = "unspecified"; | 1634 | license = "unspecified"; |
1635 | 1635 | ||
1636 | if (!license_is_gpl_compatible(license)) { | 1636 | if (!license_is_gpl_compatible(license)) { |
1637 | if (!(tainted & TAINT_PROPRIETARY_MODULE)) | 1637 | if (!test_taint(TAINT_PROPRIETARY_MODULE)) |
1638 | printk(KERN_WARNING "%s: module license '%s' taints " | 1638 | printk(KERN_WARNING "%s: module license '%s' taints " |
1639 | "kernel.\n", mod->name, license); | 1639 | "kernel.\n", mod->name, license); |
1640 | add_taint_module(mod, TAINT_PROPRIETARY_MODULE); | 1640 | add_taint_module(mod, TAINT_PROPRIETARY_MODULE); |
@@ -2552,9 +2552,9 @@ static char *module_flags(struct module *mod, char *buf) | |||
2552 | mod->state == MODULE_STATE_GOING || | 2552 | mod->state == MODULE_STATE_GOING || |
2553 | mod->state == MODULE_STATE_COMING) { | 2553 | mod->state == MODULE_STATE_COMING) { |
2554 | buf[bx++] = '('; | 2554 | buf[bx++] = '('; |
2555 | if (mod->taints & TAINT_PROPRIETARY_MODULE) | 2555 | if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE)) |
2556 | buf[bx++] = 'P'; | 2556 | buf[bx++] = 'P'; |
2557 | if (mod->taints & TAINT_FORCED_MODULE) | 2557 | if (mod->taints & (1 << TAINT_FORCED_MODULE)) |
2558 | buf[bx++] = 'F'; | 2558 | buf[bx++] = 'F'; |
2559 | /* | 2559 | /* |
2560 | * TAINT_FORCED_RMMOD: could be added. | 2560 | * TAINT_FORCED_RMMOD: could be added. |