Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140521
b: refs/heads/master
c: c6e665c
h: refs/heads/master
i:
  140519: b028843
v: v3
  • Loading branch information
Rusty Russell committed Mar 31, 2009
1 parent b8702b6 commit ca7b2a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6b37801911d7f4663c99cad8aa230bc934cea82
refs/heads/master: c6e665c8f0c18ab3686117905765b5139efd6ebd
12 changes: 6 additions & 6 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,12 +990,12 @@ static struct module_attribute *modinfo_attrs[] = {

static const char vermagic[] = VERMAGIC_STRING;

static int try_to_force_load(struct module *mod, const char *symname)
static int try_to_force_load(struct module *mod, const char *reason)
{
#ifdef CONFIG_MODULE_FORCE_LOAD
if (!test_taint(TAINT_FORCED_MODULE))
printk("%s: no version for \"%s\" found: kernel tainted.\n",
mod->name, symname);
printk(KERN_WARNING "%s: %s: kernel tainted.\n",
mod->name, reason);
add_taint_module(mod, TAINT_FORCED_MODULE);
return 0;
#else
Expand Down Expand Up @@ -2002,7 +2002,7 @@ static noinline struct module *load_module(void __user *umod,
modmagic = get_modinfo(sechdrs, infoindex, "vermagic");
/* This is allowed: modprobe --force will invalidate it. */
if (!modmagic) {
err = try_to_force_load(mod, "magic");
err = try_to_force_load(mod, "bad vermagic");
if (err)
goto free_hdr;
} else if (!same_magic(modmagic, vermagic, versindex)) {
Expand Down Expand Up @@ -2191,8 +2191,8 @@ static noinline struct module *load_module(void __user *umod,
|| (mod->num_unused_gpl_syms && !mod->unused_gpl_crcs)
#endif
) {
printk(KERN_WARNING "%s: No versions for exported symbols.\n", mod->name);
err = try_to_force_load(mod, "nocrc");
err = try_to_force_load(mod,
"no versions for exported symbols");
if (err)
goto cleanup;
}
Expand Down

0 comments on commit ca7b2a2

Please sign in to comment.