]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / PM: Avoid infinite recurrence while registering power resources
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 26 Apr 2011 09:33:18 +0000 (11:33 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Tue, 26 Apr 2011 09:33:18 +0000 (11:33 +0200)
commitfc342165f6b2a7ef8bac968b2bb472d585887ec0
tree4b945c6f83803a7ab7aa63467466b9a60a99d824
parentda97e9d740cf6a04b2f6917499040ef1e0c78631
ACPI / PM: Avoid infinite recurrence while registering power resources

There is at least one BIOS with a DSDT containing a power resource
object with a _PR0 entry pointing back to that power resource.  In
consequence, while registering that power resource
acpi_bus_get_power_flags() sees that it depends on itself and tries
to register it again, which leads to an infinitely deep recurrence.
This problem was introduced by commit 721dcc27699211993b46a90289dcd
(ACPI / PM: Register power resource devices as soon as they are
needed).

To fix this problem use the observation that power resources cannot
be power manageable and prevent acpi_bus_get_power_flags() from
being called for power resource objects.

References: https://bugzilla.kernel.org/show_bug.cgi?id=31872
Reported-and-tested-by: Pascal Dormeau <pdormeau@free.fr>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Len Brown <lenb@kernel.org>
Cc: stable@kernel.org
drivers/acpi/scan.c