From: Ben Hutchings Date: Sat, 19 Dec 2009 14:43:01 +0000 (+0000) Subject: modules: Skip empty sections when exporting section notes X-Git-Tag: v2.6.33-rc4~85 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10b465aaf9536ee5a16652fa0700740183d48ec9;p=pandora-kernel.git modules: Skip empty sections when exporting section notes Commit 35dead4 "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: Martin Michlmayr Signed-off-by: Ben Hutchings Tested-by: Martin Michlmayr Cc: stable@kernel.org Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed