AMD IOMMU: add missing checks
authorJan Beulich <jbeulich@suse.com>
Thu, 29 Aug 2013 07:31:37 +0000 (09:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Aug 2013 07:31:37 +0000 (09:31 +0200)
commit3785d30efe8264b899499e0883b10cc434bd0959
treebe35971569aae03845d5279e72fc8a2571344c8b
parent062919448e2f4b127c9c3c085b1a8e1d56a33051
AMD IOMMU: add missing checks

For one we shouldn't accept IVHD tables specifying IO-APIC IDs beyond
the limit we support (MAX_IO_APICS, currently 128).

And then we shouldn't memset() a pointer allocation of which failed.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Suravee Suthikulpanit <suravee.suthikulapanit@amd.com>
xen/drivers/passthrough/amd/iommu_acpi.c