aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 8d6cccc6c3cf..b0d7c2a41bd9 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -991,6 +991,20 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs,
991 * J. Corbet <corbet@lwn.net> 991 * J. Corbet <corbet@lwn.net>
992 */ 992 */
993#if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS) 993#if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS)
994struct module_sect_attr
995{
996 struct module_attribute mattr;
997 char *name;
998 unsigned long address;
999};
1000
1001struct module_sect_attrs
1002{
1003 struct attribute_group grp;
1004 unsigned int nsections;
1005 struct module_sect_attr attrs[0];
1006};
1007
994static ssize_t module_sect_show(struct module_attribute *mattr, 1008static ssize_t module_sect_show(struct module_attribute *mattr,
995 struct module *mod, char *buf) 1009 struct module *mod, char *buf)
996{ 1010{
@@ -1001,7 +1015,7 @@ static ssize_t module_sect_show(struct module_attribute *mattr,
1001 1015
1002static void free_sect_attrs(struct module_sect_attrs *sect_attrs) 1016static void free_sect_attrs(struct module_sect_attrs *sect_attrs)
1003{ 1017{
1004 int section; 1018 unsigned int section;
1005 1019
1006 for (section = 0; section < sect_attrs->nsections; section++) 1020 for (section = 0; section < sect_attrs->nsections; section++)
1007 kfree(sect_attrs->attrs[section].name); 1021 kfree(sect_attrs->attrs[section].name);