-
由 Ben Hutchings 提交于
Commit 35dead42 "modules: don't export section names of empty sections via sysfs" changed the set of sections that have attributes, but did not change the iteration over these attributes in add_notes_attrs(). This can lead to add_notes_attrs() creating attributes with the wrong names or with null name pointers. Introduce a sect_empty() function and use it in both add_sect_attrs() and add_notes_attrs(). Reported-by: NMartin Michlmayr <tbm@cyrius.com> Signed-off-by: NBen Hutchings <ben@decadent.org.uk> Tested-by: NMartin Michlmayr <tbm@cyrius.com> Cc: stable@kernel.org Signed-off-by: NRusty Russell <rusty@rustcorp.com.au> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
10b465aa