Patch "ACPI / scan: Do not try to attach scan handlers to devices having them" has been added to the 3.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ACPI / scan: Do not try to attach scan handlers to devices having them

to the 3.10-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-scan-do-not-try-to-attach-scan-handlers-to-devices-having-them.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 3a391a39593b48341f0908511590a6c0e55cc069 Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>
Date: Fri, 12 Jul 2013 13:45:59 +0200
Subject: ACPI / scan: Do not try to attach scan handlers to devices having them

From: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>

commit 3a391a39593b48341f0908511590a6c0e55cc069 upstream.

In acpi_bus_device_attach(), if there is an ACPI device object
for the given handle and that device object has a scan handler
attached to it already, there's nothing more to do for that handle.
Moreover, if acpi_scan_attach_handler() is called then, it may
execute the .attach() callback of the ACPI scan handler already
attached to the device object and that may lead to interesting
breakage.

For this reason, make acpi_bus_device_attach() return success
immediately when the handle's device object has a scan handler
attached to it.

Reported-by: Toshi Kani <toshi.kani@xxxxxx>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Acked-by: Toshi Kani <toshi.kani@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/acpi/scan.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1892,6 +1892,9 @@ static acpi_status acpi_bus_device_attac
 	if (acpi_bus_get_device(handle, &device))
 		return AE_CTRL_DEPTH;
 
+	if (device->handler)
+		return AE_OK;
+
 	ret = acpi_scan_attach_handler(device);
 	if (ret)
 		return ret > 0 ? AE_OK : AE_CTRL_DEPTH;


Patches currently in stable-queue which might be from rafael.j.wysocki@xxxxxxxxx are

queue-3.10/acpi-scan-always-call-acpi_bus_scan-for-bus-check-notifications.patch
queue-3.10/acpi-video-ignore-bios-initial-backlight-value-for-fujitsu-e753.patch
queue-3.10/acpi-memhotplug-fix-a-stale-pointer-in-error-path.patch
queue-3.10/cpufreq-intel_pstate-change-to-scale-off-of-max-p-state.patch
queue-3.10/acpi-scan-do-not-try-to-attach-scan-handlers-to-devices-having-them.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]