diff options
| -rw-r--r-- | include/linux/module.h | 6 | ||||
| -rw-r--r-- | kernel/module.c | 2 | ||||
| -rw-r--r-- | scripts/module-common.lds | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 9ad68561d8c2..21f56393602f 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -583,7 +583,7 @@ extern bool try_module_get(struct module *module); | |||
| 583 | extern void module_put(struct module *module); | 583 | extern void module_put(struct module *module); |
| 584 | 584 | ||
| 585 | #else /*!CONFIG_MODULE_UNLOAD*/ | 585 | #else /*!CONFIG_MODULE_UNLOAD*/ |
| 586 | static inline int try_module_get(struct module *module) | 586 | static inline bool try_module_get(struct module *module) |
| 587 | { | 587 | { |
| 588 | return !module || module_is_live(module); | 588 | return !module || module_is_live(module); |
| 589 | } | 589 | } |
| @@ -680,9 +680,9 @@ static inline void __module_get(struct module *module) | |||
| 680 | { | 680 | { |
| 681 | } | 681 | } |
| 682 | 682 | ||
| 683 | static inline int try_module_get(struct module *module) | 683 | static inline bool try_module_get(struct module *module) |
| 684 | { | 684 | { |
| 685 | return 1; | 685 | return true; |
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | static inline void module_put(struct module *module) | 688 | static inline void module_put(struct module *module) |
diff --git a/kernel/module.c b/kernel/module.c index 63321952c71c..f37308b733d8 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -4035,7 +4035,7 @@ unsigned long module_kallsyms_lookup_name(const char *name) | |||
| 4035 | 4035 | ||
| 4036 | /* Don't lock: we're in enough trouble already. */ | 4036 | /* Don't lock: we're in enough trouble already. */ |
| 4037 | preempt_disable(); | 4037 | preempt_disable(); |
| 4038 | if ((colon = strchr(name, ':')) != NULL) { | 4038 | if ((colon = strnchr(name, MODULE_NAME_LEN, ':')) != NULL) { |
| 4039 | if ((mod = find_module_all(name, colon - name, false)) != NULL) | 4039 | if ((mod = find_module_all(name, colon - name, false)) != NULL) |
| 4040 | ret = mod_find_symname(mod, colon+1); | 4040 | ret = mod_find_symname(mod, colon+1); |
| 4041 | } else { | 4041 | } else { |
diff --git a/scripts/module-common.lds b/scripts/module-common.lds index 9b6e246a45d0..d61b9e8678e8 100644 --- a/scripts/module-common.lds +++ b/scripts/module-common.lds | |||
| @@ -20,8 +20,7 @@ SECTIONS { | |||
| 20 | __kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) } | 20 | __kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) } |
| 21 | __kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) } | 21 | __kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) } |
| 22 | 22 | ||
| 23 | . = ALIGN(8); | 23 | .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) } |
| 24 | .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } | ||
| 25 | 24 | ||
| 26 | __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } | 25 | __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } |
| 27 | } | 26 | } |
