diff options
-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 5fd00766a4d..599fc85bd2c 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -990,12 +990,12 @@ static struct module_attribute *modinfo_attrs[] = { | |||
990 | 990 | ||
991 | static const char vermagic[] = VERMAGIC_STRING; | 991 | static const char vermagic[] = VERMAGIC_STRING; |
992 | 992 | ||
993 | static int try_to_force_load(struct module *mod, const char *symname) | 993 | static int try_to_force_load(struct module *mod, const char *reason) |
994 | { | 994 | { |
995 | #ifdef CONFIG_MODULE_FORCE_LOAD | 995 | #ifdef CONFIG_MODULE_FORCE_LOAD |
996 | if (!test_taint(TAINT_FORCED_MODULE)) | 996 | if (!test_taint(TAINT_FORCED_MODULE)) |
997 | printk("%s: no version for \"%s\" found: kernel tainted.\n", | 997 | printk(KERN_WARNING "%s: %s: kernel tainted.\n", |
998 | mod->name, symname); | 998 | mod->name, reason); |
999 | add_taint_module(mod, TAINT_FORCED_MODULE); | 999 | add_taint_module(mod, TAINT_FORCED_MODULE); |
1000 | return 0; | 1000 | return 0; |
1001 | #else | 1001 | #else |
@@ -2002,7 +2002,7 @@ static noinline struct module *load_module(void __user *umod, | |||
2002 | modmagic = get_modinfo(sechdrs, infoindex, "vermagic"); | 2002 | modmagic = get_modinfo(sechdrs, infoindex, "vermagic"); |
2003 | /* This is allowed: modprobe --force will invalidate it. */ | 2003 | /* This is allowed: modprobe --force will invalidate it. */ |
2004 | if (!modmagic) { | 2004 | if (!modmagic) { |
2005 | err = try_to_force_load(mod, "magic"); | 2005 | err = try_to_force_load(mod, "bad vermagic"); |
2006 | if (err) | 2006 | if (err) |
2007 | goto free_hdr; | 2007 | goto free_hdr; |
2008 | } else if (!same_magic(modmagic, vermagic, versindex)) { | 2008 | } else if (!same_magic(modmagic, vermagic, versindex)) { |
@@ -2191,8 +2191,8 @@ static noinline struct module *load_module(void __user *umod, | |||
2191 | || (mod->num_unused_gpl_syms && !mod->unused_gpl_crcs) | 2191 | || (mod->num_unused_gpl_syms && !mod->unused_gpl_crcs) |
2192 | #endif | 2192 | #endif |
2193 | ) { | 2193 | ) { |
2194 | printk(KERN_WARNING "%s: No versions for exported symbols.\n", mod->name); | 2194 | err = try_to_force_load(mod, |
2195 | err = try_to_force_load(mod, "nocrc"); | 2195 | "no versions for exported symbols"); |
2196 | if (err) | 2196 | if (err) |
2197 | goto cleanup; | 2197 | goto cleanup; |
2198 | } | 2198 | } |