ACPI / scan: not cache _SUN value in struct acpi_device_pnp
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Wed, 3 Sep 2014 04:39:13 +0000 (13:39 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:19:20 +0000 (09:19 -0700)
commit089d41d4057ff601e34b701a4d03f06c479900aa
tree4742152b04fc5bfae6af79965b0aedda8c994a72
parent4b56ddf9debed7505e336202209a8a2dfda5852d
ACPI / scan: not cache _SUN value in struct acpi_device_pnp

commit a383b68d9fe9864c4d3b86f67ad6488f58136435 upstream.

The _SUN device indentification object is not guaranteed to return
the same value every time it is executed, so we should not cache its
return value, but rather execute it every time as needed.  If it is
cached, an incorrect stale value may be used in some situations.

This issue was exposed by commit 202317a573b2 (ACPI / scan: Add
acpi_device objects for all device nodes in the namespace).  Fix it
by avoiding to cache the return value of _SUN.

Fixes: 202317a573b2 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace)
Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/scan.c
include/acpi/acpi_bus.h