aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/module.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 3202c9950073..91fe6958b6e1 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -81,7 +81,8 @@ int unregister_module_notifier(struct notifier_block * nb)
81} 81}
82EXPORT_SYMBOL(unregister_module_notifier); 82EXPORT_SYMBOL(unregister_module_notifier);
83 83
84/* We require a truly strong try_module_get() */ 84/* We require a truly strong try_module_get(): 0 means failure due to
85 ongoing or failed initialization etc. */
85static inline int strong_try_module_get(struct module *mod) 86static inline int strong_try_module_get(struct module *mod)
86{ 87{
87 if (mod && mod->state == MODULE_STATE_COMING) 88 if (mod && mod->state == MODULE_STATE_COMING)
@@ -952,7 +953,8 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs,
952 ret = __find_symbol(name, &owner, &crc, 953 ret = __find_symbol(name, &owner, &crc,
953 !(mod->taints & TAINT_PROPRIETARY_MODULE)); 954 !(mod->taints & TAINT_PROPRIETARY_MODULE));
954 if (ret) { 955 if (ret) {
955 /* use_module can fail due to OOM, or module unloading */ 956 /* use_module can fail due to OOM,
957 or module initialization or unloading */
956 if (!check_version(sechdrs, versindex, name, mod, crc) || 958 if (!check_version(sechdrs, versindex, name, mod, crc) ||
957 !use_module(mod, owner)) 959 !use_module(mod, owner))
958 ret = 0; 960 ret = 0;
@@ -1369,7 +1371,7 @@ dup:
1369 return ret; 1371 return ret;
1370} 1372}
1371 1373
1372/* Change all symbols so that sh_value encodes the pointer directly. */ 1374/* Change all symbols so that st_value encodes the pointer directly. */
1373static int simplify_symbols(Elf_Shdr *sechdrs, 1375static int simplify_symbols(Elf_Shdr *sechdrs,
1374 unsigned int symindex, 1376 unsigned int symindex,
1375 const char *strtab, 1377 const char *strtab,