Skip to content

Commit

Permalink
Revert "module.c: allow stock modules to load"
Browse files Browse the repository at this point in the history
This reverts commit 2846ca2.
  • Loading branch information
engstk committed Oct 26, 2020
1 parent 98dadf5 commit f4f3b09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ static int check_version(const struct load_info *info,
bad_version:
pr_warn("%s: disagrees about version of symbol %s\n",
info->name, symname);
return 1;
return 0;
}

static inline int check_modstruct_version(const struct load_info *info,
Expand Down Expand Up @@ -3040,15 +3040,15 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
modmagic = NULL;

/* This is allowed: modprobe --force will invalidate it. */
/*if (!modmagic) {
if (!modmagic) {
err = try_to_force_load(mod, "bad vermagic");
if (err)
return err;
} else if (!same_magic(modmagic, vermagic, info->index.vers)) {
pr_err("%s: version magic '%s' should be '%s'\n",
info->name, modmagic, vermagic);
return -ENOEXEC;
}*/
}

if (!get_modinfo(info, "intree")) {
if (!test_taint(TAINT_OOT_MODULE))
Expand Down

0 comments on commit f4f3b09

Please sign in to comment.