mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI / scan: Clear match_driver flag in acpi_bus_trim()
@ 2014-01-27  0:16 Rafael J. Wysocki
  2014-01-28 21:59 ` Toshi Kani
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2014-01-27  0:16 UTC (permalink / raw)
  To: ACPI Devel Maling List
  Cc: Linux Kernel Mailing List, Mika Westerberg, Toshi Kani

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Drivers should not bind to struct acpi_device objects that
acpi_bus_trim() has been called for, so make that function
clear flags.match_driver for those objects.

If that is not done, an ACPI driver may theoretically try to operate
a device that is not physically present.

Fixes: 202317a573b2 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/scan.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-pm/drivers/acpi/scan.c
===================================================================
--- linux-pm.orig/drivers/acpi/scan.c
+++ linux-pm/drivers/acpi/scan.c
@@ -2106,6 +2106,7 @@ void acpi_bus_trim(struct acpi_device *a
 	list_for_each_entry_reverse(child, &adev->children, node)
 		acpi_bus_trim(child);
 
+	adev->flags.match_driver = false;
 	if (handler) {
 		if (handler->detach)
 			handler->detach(adev);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-28 22:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-27  0:16 [PATCH] ACPI / scan: Clear match_driver flag in acpi_bus_trim() Rafael J. Wysocki
2014-01-28 21:59 ` Toshi Kani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome