From f084dbb939070281be7c882db63a4a428c51fcf4 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 23 Mar 2013 19:16:37 +0000 Subject: ACPI: Set length even for TYPE_END_TAG acpi resource Found with a network device in QEMU/KVM guest not working anymore. Bisected to commit c13085e5 ACPICA: Resource Mgr: Prevent infinite loops in resource walks That commit will check acpi_resource length strictly which causes acpi_set_current_resources to return failure and IRQ for PCI devices is not set properly. Set length for all those TYPE_END_TAG acpi_resources. [rjw: Changelog] Bisected-by: Yinghai Lu Signed-off-by: Yinghai Lu Signed-off-by: Rafael J. Wysocki --- drivers/pnp/pnpacpi/rsparser.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/pnp/pnpacpi') diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index b8f4ea7b27fc..9847ab163829 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c @@ -634,6 +634,7 @@ int pnpacpi_build_resource_template(struct pnp_dev *dev, } /* resource will pointer the end resource now */ resource->type = ACPI_RESOURCE_TYPE_END_TAG; + resource->length = sizeof(struct acpi_resource); return 0; } -- cgit v1.2.1