Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204810
b: refs/heads/master
c: d6df72a
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell committed Aug 5, 2010
1 parent 9b5e6d4 commit 6c9a3a9
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: 8b5f61a795fe37be090b0fd18b6b7271db9298e0
refs/heads/master: d6df72a06e067139d491da4a9d14d92ad39e7a50
12 changes: 6 additions & 6 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2225,11 +2225,13 @@ static int rewrite_section_headers(struct load_info *info)
if (strstarts(info->secstrings+shdr->sh_name, ".exit"))
shdr->sh_flags &= ~(unsigned long)SHF_ALLOC;
#endif
/* Don't keep modinfo and version sections. */
if (!strcmp(info->secstrings+shdr->sh_name, "__versions")
|| !strcmp(info->secstrings+shdr->sh_name, ".modinfo"))
shdr->sh_flags &= ~(unsigned long)SHF_ALLOC;
}

/* Track but don't keep modinfo and version sections. */
info->index.vers = find_sec(info->hdr, info->sechdrs, info->secstrings, "__versions");
info->index.info = find_sec(info->hdr, info->sechdrs, info->secstrings, ".modinfo");
info->sechdrs[info->index.info].sh_flags &= ~(unsigned long)SHF_ALLOC;
info->sechdrs[info->index.vers].sh_flags &= ~(unsigned long)SHF_ALLOC;
return 0;
}

Expand Down Expand Up @@ -2282,8 +2284,6 @@ static struct module *setup_load_info(struct load_info *info)
return ERR_PTR(-ENOEXEC);
}

info->index.vers = find_sec(info->hdr, info->sechdrs, info->secstrings, "__versions");
info->index.info = find_sec(info->hdr, info->sechdrs, info->secstrings, ".modinfo");
info->index.pcpu = find_pcpusec(info->hdr, info->sechdrs, info->secstrings);

/* Check module struct version now, before we try to use module. */
Expand Down

0 comments on commit 6c9a3a9

Please sign in to comment.