]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
module: make the modinfo name const
authorLuis R. Rodriguez <mcgrof@kernel.org>
Thu, 29 Jun 2017 01:32:31 +0000 (18:32 -0700)
committerJessica Yu <jeyu@kernel.org>
Thu, 29 Jun 2017 12:19:17 +0000 (14:19 +0200)
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>
kernel/module.c

index afc6ede7bcdf31021f750a4f272a1121e23b9125..d072877075576ba60cbc8268b70db11f58fe0a83 100644 (file)
@@ -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;
@@ -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;