kernel/acpi: Sync acpi_pci_link with FreeBSD.
authorSascha Wildner <saw@online.de>
Wed, 8 May 2013 18:26:52 +0000 (20:26 +0200)
committerSascha Wildner <saw@online.de>
Wed, 8 May 2013 18:27:09 +0000 (20:27 +0200)
commit06871c60cc152690c2ce3190c6a1b23101752666
treed22919a03b4e444d90c79867bbd2dbbb2dd4cb13
parenteb73e8d8d3409bb01ea69de0cae3ca0312aef900
kernel/acpi: Sync acpi_pci_link with FreeBSD.

* Fix use-after-free bug for extended IRQ resource[1].

* Some BIOSes use an Extended IRQ resource descriptor in _PRS for a link
  that uses non-ISA IRQs but use a plain IRQ resource in _CRS.  However,
  a non-ISA IRQ can't fit into a plain IRQ resource.  If we encounter a
  link like this, build the resource buffer from _PRS instead of _CRS.

* Set the correct size of the end tag in a resource buffer.

* Make MALLOC_DEFINEs that have no corresponding MALLOC_DECLAREs static.

Reviewed-and-tested-by: sephe
sys/dev/acpica/acpi_pci_link.c