Message ID | 87k4w4wux9.fsf@purkki.valot.fi (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
--- a/kernel/module.c +++ b/kernel/module.c @@ -1189,10 +1189,13 @@ static void add_notes_attrs(struct module *mod, unsigned int nsect, if (!notes_attrs->dir) goto out; - for (i = 0; i < notes; ++i) + for (i = 0; i < notes; ++i) { + if (WARN_ON(!notes_attrs->attrs[i].attr.name)) + continue; if (sysfs_create_bin_file(notes_attrs->dir, ¬es_attrs->attrs[i])) goto out; + } mod->notes_attrs = notes_attrs;