aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 4202da97a1da..901cd6ac2f11 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -987,12 +987,11 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs,
987 return ret; 987 return ret;
988} 988}
989 989
990
991/* 990/*
992 * /sys/module/foo/sections stuff 991 * /sys/module/foo/sections stuff
993 * J. Corbet <corbet@lwn.net> 992 * J. Corbet <corbet@lwn.net>
994 */ 993 */
995#ifdef CONFIG_KALLSYMS 994#if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS)
996static ssize_t module_sect_show(struct module_attribute *mattr, 995static ssize_t module_sect_show(struct module_attribute *mattr,
997 struct module *mod, char *buf) 996 struct module *mod, char *buf)
998{ 997{
@@ -1188,7 +1187,7 @@ static inline void add_notes_attrs(struct module *mod, unsigned int nsect,
1188static inline void remove_notes_attrs(struct module *mod) 1187static inline void remove_notes_attrs(struct module *mod)
1189{ 1188{
1190} 1189}
1191#endif /* CONFIG_KALLSYMS */ 1190#endif
1192 1191
1193#ifdef CONFIG_SYSFS 1192#ifdef CONFIG_SYSFS
1194int module_add_modinfo_attrs(struct module *mod) 1193int module_add_modinfo_attrs(struct module *mod)
@@ -1231,9 +1230,7 @@ void module_remove_modinfo_attrs(struct module *mod)
1231 } 1230 }
1232 kfree(mod->modinfo_attrs); 1231 kfree(mod->modinfo_attrs);
1233} 1232}
1234#endif
1235 1233
1236#ifdef CONFIG_SYSFS
1237int mod_sysfs_init(struct module *mod) 1234int mod_sysfs_init(struct module *mod)
1238{ 1235{
1239 int err; 1236 int err;
@@ -2038,7 +2035,7 @@ static struct module *load_module(void __user *umod,
2038#ifdef CONFIG_MARKERS 2035#ifdef CONFIG_MARKERS
2039 if (!mod->taints) 2036 if (!mod->taints)
2040 marker_update_probe_range(mod->markers, 2037 marker_update_probe_range(mod->markers,
2041 mod->markers + mod->num_markers, NULL, NULL); 2038 mod->markers + mod->num_markers);
2042#endif 2039#endif
2043 err = module_finalize(hdr, sechdrs, mod); 2040 err = module_finalize(hdr, sechdrs, mod);
2044 if (err < 0) 2041 if (err < 0)
@@ -2564,7 +2561,7 @@ EXPORT_SYMBOL(struct_module);
2564#endif 2561#endif
2565 2562
2566#ifdef CONFIG_MARKERS 2563#ifdef CONFIG_MARKERS
2567void module_update_markers(struct module *probe_module, int *refcount) 2564void module_update_markers(void)
2568{ 2565{
2569 struct module *mod; 2566 struct module *mod;
2570 2567
@@ -2572,8 +2569,7 @@ void module_update_markers(struct module *probe_module, int *refcount)
2572 list_for_each_entry(mod, &modules, list) 2569 list_for_each_entry(mod, &modules, list)
2573 if (!mod->taints) 2570 if (!mod->taints)
2574 marker_update_probe_range(mod->markers, 2571 marker_update_probe_range(mod->markers,
2575 mod->markers + mod->num_markers, 2572 mod->markers + mod->num_markers);
2576 probe_module, refcount);
2577 mutex_unlock(&module_mutex); 2573 mutex_unlock(&module_mutex);
2578} 2574}
2579#endif 2575#endif