diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-03-23 15:16:37 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-03-23 20:00:38 -0400 |
commit | f084dbb939070281be7c882db63a4a428c51fcf4 (patch) | |
tree | bfda012c8613e30ff2bd6e41255af7d3533b497e /drivers/pnp | |
parent | eccc534378e74030b31cfe10f1188df06f7f680a (diff) |
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 <yinghai@kernel.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, | |||
634 | } | 634 | } |
635 | /* resource will pointer the end resource now */ | 635 | /* resource will pointer the end resource now */ |
636 | resource->type = ACPI_RESOURCE_TYPE_END_TAG; | 636 | resource->type = ACPI_RESOURCE_TYPE_END_TAG; |
637 | resource->length = sizeof(struct acpi_resource); | ||
637 | 638 | ||
638 | return 0; | 639 | return 0; |
639 | } | 640 | } |