]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 3 Sep 2014 20:41:14 +0000 (22:41 +0200)
commitfa50db57bc3654f1e3f645e1cda59dd5c29dcd43
tree8f51aa9ffd07ed81b4acdf1d58387cb45d4edcf1
parentc2dea2904d38f5f9f9f866476cafdab22b452972
ACPI / scan: not cache _SUN value in struct acpi_device_pnp

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 82f9a6c6c86b (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: 82f9a6c6c86b (ACPI / scan: Add acpi_device objects for all device nodes in the namespace)
Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c
include/acpi/acpi_bus.h