diff options
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/module.c b/kernel/module.c index 8dc7f5e80dd8..11869408f79b 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -640,7 +640,7 @@ static int module_unload_init(struct module *mod) | |||
| 640 | INIT_LIST_HEAD(&mod->target_list); | 640 | INIT_LIST_HEAD(&mod->target_list); |
| 641 | 641 | ||
| 642 | /* Hold reference count during initialization. */ | 642 | /* Hold reference count during initialization. */ |
| 643 | __this_cpu_write(mod->refptr->incs, 1); | 643 | raw_cpu_write(mod->refptr->incs, 1); |
| 644 | 644 | ||
| 645 | return 0; | 645 | return 0; |
| 646 | } | 646 | } |
| @@ -1013,6 +1013,8 @@ static size_t module_flags_taint(struct module *mod, char *buf) | |||
| 1013 | buf[l++] = 'F'; | 1013 | buf[l++] = 'F'; |
| 1014 | if (mod->taints & (1 << TAINT_CRAP)) | 1014 | if (mod->taints & (1 << TAINT_CRAP)) |
| 1015 | buf[l++] = 'C'; | 1015 | buf[l++] = 'C'; |
| 1016 | if (mod->taints & (1 << TAINT_UNSIGNED_MODULE)) | ||
| 1017 | buf[l++] = 'E'; | ||
| 1016 | /* | 1018 | /* |
| 1017 | * TAINT_FORCED_RMMOD: could be added. | 1019 | * TAINT_FORCED_RMMOD: could be added. |
| 1018 | * TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't | 1020 | * TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't |
| @@ -3218,7 +3220,7 @@ static int load_module(struct load_info *info, const char __user *uargs, | |||
| 3218 | pr_notice_once("%s: module verification failed: signature " | 3220 | pr_notice_once("%s: module verification failed: signature " |
| 3219 | "and/or required key missing - tainting " | 3221 | "and/or required key missing - tainting " |
| 3220 | "kernel\n", mod->name); | 3222 | "kernel\n", mod->name); |
| 3221 | add_taint_module(mod, TAINT_FORCED_MODULE, LOCKDEP_STILL_OK); | 3223 | add_taint_module(mod, TAINT_UNSIGNED_MODULE, LOCKDEP_STILL_OK); |
| 3222 | } | 3224 | } |
| 3223 | #endif | 3225 | #endif |
| 3224 | 3226 | ||
| @@ -3813,12 +3815,12 @@ void print_modules(void) | |||
| 3813 | list_for_each_entry_rcu(mod, &modules, list) { | 3815 | list_for_each_entry_rcu(mod, &modules, list) { |
| 3814 | if (mod->state == MODULE_STATE_UNFORMED) | 3816 | if (mod->state == MODULE_STATE_UNFORMED) |
| 3815 | continue; | 3817 | continue; |
| 3816 | printk(" %s%s", mod->name, module_flags(mod, buf)); | 3818 | pr_cont(" %s%s", mod->name, module_flags(mod, buf)); |
| 3817 | } | 3819 | } |
| 3818 | preempt_enable(); | 3820 | preempt_enable(); |
| 3819 | if (last_unloaded_module[0]) | 3821 | if (last_unloaded_module[0]) |
| 3820 | printk(" [last unloaded: %s]", last_unloaded_module); | 3822 | pr_cont(" [last unloaded: %s]", last_unloaded_module); |
| 3821 | printk("\n"); | 3823 | pr_cont("\n"); |
| 3822 | } | 3824 | } |
| 3823 | 3825 | ||
| 3824 | #ifdef CONFIG_MODVERSIONS | 3826 | #ifdef CONFIG_MODVERSIONS |
