Skip to content

Commit

Permalink
module: Allow wlan to load
Browse files Browse the repository at this point in the history
Signed-off-by: flar2 <asegaert@gmail.com>
  • Loading branch information
flar2 authored and psndna88 committed Jul 19, 2020
1 parent d63a417 commit 8137e3d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,8 +1297,10 @@ static int check_version(Elf_Shdr *sechdrs,
unsigned int i, num_versions;
struct modversion_info *versions;

if(!strncmp("wlan", mod->name, 6))
/* Force wlan to load */
if (!strncmp("wlan", mod->name, 4))
return 1;

/* Exporting module didn't supply crcs? OK, we're already tainted. */
if (!crc)
return 1;
Expand Down Expand Up @@ -2893,6 +2895,9 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
const char *modmagic = get_modinfo(info, "vermagic");
int err;

if(!strncmp("wlan", mod->name, 4))
goto end;

if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;

Expand All @@ -2907,6 +2912,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
return -ENOEXEC;
}

end:
if (!get_modinfo(info, "intree")) {
if (!test_taint(TAINT_OOT_MODULE))
pr_warn("%s: loading out-of-tree module taints kernel.\n",
Expand Down

0 comments on commit 8137e3d

Please sign in to comment.