ACPI: avoid empty file name in sysfs
authorPeter Gruber <nokos@gmx.net>
Tue, 28 Oct 2008 03:59:36 +0000 (23:59 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Nov 2008 22:54:45 +0000 (14:54 -0800)
commit8bb02ba7401e1974e0030db00385f3a6ef708a62
treee0c46607270f94f0da54fd636fb47a674d4da1b8
parent2b233b842dfb434bfc946bbd97ec475a01b89000
ACPI: avoid empty file name in sysfs

commit 4feba70a2c1a1a0c96909f657f48b2e11e682370 upstream.

Since commit bc45b1d39a925b56796bebf8a397a0491489d85c acpi tables are
allowed to have an empty signature and /sys/firmware/acpi/tables uses the
signature as filename.  Applications using naive recursion through /sys
loop forever.  A possible solution would be: (replacing the zero length
filename with the string "NULL")

http://bugzilla.kernel.org/show_bug.cgi?id=11539

Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/system.c