diff options
Diffstat (limited to 'kernel/module')
| -rw-r--r-- | kernel/module/livepatch.c | 10 | ||||
| -rw-r--r-- | kernel/module/main.c | 3 | 
2 files changed, 7 insertions, 6 deletions
diff --git a/kernel/module/livepatch.c b/kernel/module/livepatch.c index 486d4ff92719..a89f01e1d6b7 100644 --- a/kernel/module/livepatch.c +++ b/kernel/module/livepatch.c @@ -11,7 +11,7 @@  #include "internal.h"  /* - * Persist Elf information about a module. Copy the Elf header, + * Persist ELF information about a module. Copy the ELF header,   * section header table, section string table, and symtab section   * index from info to mod->klp_info.   */ @@ -25,11 +25,11 @@ int copy_module_elf(struct module *mod, struct load_info *info)  	if (!mod->klp_info)  		return -ENOMEM; -	/* Elf header */ +	/* ELF header */  	size = sizeof(mod->klp_info->hdr);  	memcpy(&mod->klp_info->hdr, info->hdr, size); -	/* Elf section header table */ +	/* ELF section header table */  	size = sizeof(*info->sechdrs) * info->hdr->e_shnum;  	mod->klp_info->sechdrs = kmemdup(info->sechdrs, size, GFP_KERNEL);  	if (!mod->klp_info->sechdrs) { @@ -37,7 +37,7 @@ int copy_module_elf(struct module *mod, struct load_info *info)  		goto free_info;  	} -	/* Elf section name string table */ +	/* ELF section name string table */  	size = info->sechdrs[info->hdr->e_shstrndx].sh_size;  	mod->klp_info->secstrings = kmemdup(info->secstrings, size, GFP_KERNEL);  	if (!mod->klp_info->secstrings) { @@ -45,7 +45,7 @@ int copy_module_elf(struct module *mod, struct load_info *info)  		goto free_sechdrs;  	} -	/* Elf symbol section index */ +	/* ELF symbol section index */  	symndx = info->index.sym;  	mod->klp_info->symndx = symndx; diff --git a/kernel/module/main.c b/kernel/module/main.c index 4ac3fe43e6c8..d3be89de706d 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -17,6 +17,7 @@  #include <linux/fs.h>  #include <linux/kernel.h>  #include <linux/kernel_read_file.h> +#include <linux/kstrtox.h>  #include <linux/slab.h>  #include <linux/vmalloc.h>  #include <linux/elf.h> @@ -2675,7 +2676,7 @@ static int unknown_module_param_cb(char *param, char *val, const char *modname,  	int ret;  	if (strcmp(param, "async_probe") == 0) { -		if (strtobool(val, &mod->async_probe_requested)) +		if (kstrtobool(val, &mod->async_probe_requested))  			mod->async_probe_requested = true;  		return 0;  	}  | 
