Skip to content

Commit

Permalink
module: make the modinfo name const
Browse files Browse the repository at this point in the history
This can be accomplished by making blacklisted() also accept const.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Acked-by: Kees Cook <keescook@chromium.org>
[jeyu: fix typo]
Signed-off-by: Jessica Yu <jeyu@kernel.org>
  • Loading branch information
Luis R. Rodriguez authored and Jessica Yu committed Jun 29, 2017
1 parent 165d1cc commit 96b5b19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ int unregister_module_notifier(struct notifier_block *nb)
EXPORT_SYMBOL(unregister_module_notifier);

struct load_info {
char *name;
const char *name;
Elf_Ehdr *hdr;
unsigned long len;
Elf_Shdr *sechdrs;
Expand Down Expand Up @@ -3265,7 +3265,7 @@ int __weak module_frob_arch_sections(Elf_Ehdr *hdr,

/* module_blacklist is a comma-separated list of module names */
static char *module_blacklist;
static bool blacklisted(char *module_name)
static bool blacklisted(const char *module_name)
{
const char *p;
size_t len;
Expand Down

0 comments on commit 96b5b19

Please sign in to comment.