aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index e5538d5f00ad..c968d3606dca 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1085,6 +1085,7 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect,
1085 if (sattr->name == NULL) 1085 if (sattr->name == NULL)
1086 goto out; 1086 goto out;
1087 sect_attrs->nsections++; 1087 sect_attrs->nsections++;
1088 sysfs_attr_init(&sattr->mattr.attr);
1088 sattr->mattr.show = module_sect_show; 1089 sattr->mattr.show = module_sect_show;
1089 sattr->mattr.store = NULL; 1090 sattr->mattr.store = NULL;
1090 sattr->mattr.attr.name = sattr->name; 1091 sattr->mattr.attr.name = sattr->name;
@@ -1180,6 +1181,7 @@ static void add_notes_attrs(struct module *mod, unsigned int nsect,
1180 if (sect_empty(&sechdrs[i])) 1181 if (sect_empty(&sechdrs[i]))
1181 continue; 1182 continue;
1182 if (sechdrs[i].sh_type == SHT_NOTE) { 1183 if (sechdrs[i].sh_type == SHT_NOTE) {
1184 sysfs_bin_attr_init(nattr);
1183 nattr->attr.name = mod->sect_attrs->attrs[loaded].name; 1185 nattr->attr.name = mod->sect_attrs->attrs[loaded].name;
1184 nattr->attr.mode = S_IRUGO; 1186 nattr->attr.mode = S_IRUGO;
1185 nattr->size = sechdrs[i].sh_size; 1187 nattr->size = sechdrs[i].sh_size;
@@ -1252,6 +1254,7 @@ int module_add_modinfo_attrs(struct module *mod)
1252 if (!attr->test || 1254 if (!attr->test ||
1253 (attr->test && attr->test(mod))) { 1255 (attr->test && attr->test(mod))) {
1254 memcpy(temp_attr, attr, sizeof(*temp_attr)); 1256 memcpy(temp_attr, attr, sizeof(*temp_attr));
1257 sysfs_attr_init(&temp_attr->attr);
1255 error = sysfs_create_file(&mod->mkobj.kobj,&temp_attr->attr); 1258 error = sysfs_create_file(&mod->mkobj.kobj,&temp_attr->attr);
1256 ++temp_attr; 1259 ++temp_attr;
1257 } 1260 }