diff --git a/include/linux/module.h b/include/linux/module.h index 9ad68561d8c2cf5c3b8e691861314a397ff34f2f..21f56393602f2000b901238cd9a7911e23e04448 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -583,7 +583,7 @@ extern bool try_module_get(struct module *module); extern void module_put(struct module *module); #else /*!CONFIG_MODULE_UNLOAD*/ -static inline int try_module_get(struct module *module) +static inline bool try_module_get(struct module *module) { return !module || module_is_live(module); } @@ -680,9 +680,9 @@ static inline void __module_get(struct module *module) { } -static inline int try_module_get(struct module *module) +static inline bool try_module_get(struct module *module) { - return 1; + return true; } static inline void module_put(struct module *module) diff --git a/kernel/module.c b/kernel/module.c index 63321952c71cb58f5b1b9daaa30f09b30a28862f..f37308b733d845526918588d2948673925e7ac5b 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -4035,7 +4035,7 @@ unsigned long module_kallsyms_lookup_name(const char *name) /* Don't lock: we're in enough trouble already. */ preempt_disable(); - if ((colon = strchr(name, ':')) != NULL) { + if ((colon = strnchr(name, MODULE_NAME_LEN, ':')) != NULL) { if ((mod = find_module_all(name, colon - name, false)) != NULL) ret = mod_find_symname(mod, colon+1); } else { diff --git a/scripts/module-common.lds b/scripts/module-common.lds index 9b6e246a45d09f530b3527b81946a30b1256697f..d61b9e8678e8c0fd17220dae2e3d49fa08d23070 100644 --- a/scripts/module-common.lds +++ b/scripts/module-common.lds @@ -20,8 +20,7 @@ SECTIONS { __kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) } __kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) } - . = ALIGN(8); - .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } + .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) } __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } }