This is a note to let you know that I've just added the patch titled
ACPI / PM: Fix error code path for power resources initialization
to the 3.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
acpi-pm-fix-error-code-path-for-power-resources.patch
and it can be found in the queue-3.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 6ee22e9d59151550a55d370b14109bdae8b58bda Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 19 Jun 2013 00:44:45 +0200
Subject: ACPI / PM: Fix error code path for power resources initialization
From: "Rafael J. Wysocki" <[email protected]>
commit 6ee22e9d59151550a55d370b14109bdae8b58bda upstream.
Commit 781d737 (ACPI: Drop power resources driver) introduced a
bug in the power resources initialization error code path causing
a NULL pointer to be referenced in acpi_release_power_resource()
if there's an error triggering a jump to the 'err' label in
acpi_add_power_resource(). This happens because the list_node
field of struct acpi_power_resource has not been initialized yet
at this point and doing a list_del() on it is a bad idea.
To prevent this problem from occuring, initialize the list_node
field of struct acpi_power_resource upfront.
Reported-by: Mika Westerberg <[email protected]>
Tested-by: Lan Tianyu <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Yasuaki Ishimatsu <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/acpi/power.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -865,6 +865,7 @@ int acpi_add_power_resource(acpi_handle
ACPI_STA_DEFAULT);
mutex_init(&resource->resource_lock);
INIT_LIST_HEAD(&resource->dependent);
+ INIT_LIST_HEAD(&resource->list_node);
resource->name = device->pnp.bus_id;
strcpy(acpi_device_name(device), ACPI_POWER_DEVICE_NAME);
strcpy(acpi_device_class(device), ACPI_POWER_CLASS);
Patches currently in stable-queue which might be from
[email protected] are
queue-3.9/acpi-dock-take-acpi-scan-lock-in-write_undock.patch
queue-3.9/acpi-resources-call-acpi_get_override_irq-only-for-legacy-irq-resources.patch
queue-3.9/acpi-pm-fix-error-code-path-for-power-resources.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html