aboutsummaryrefslogtreecommitdiffstats
path: root/xen/drivers/passthrough/vtd/dmar.c
diff options
context:
space:
mode:
Diffstat (limited to 'xen/drivers/passthrough/vtd/dmar.c')
-rw-r--r--xen/drivers/passthrough/vtd/dmar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 5ecade2657..0f117b1789 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -400,6 +400,9 @@ acpi_parse_one_drhd(struct acpi_dmar_entry_header *header)
if ( (ret = acpi_dmar_check_length(header, sizeof(*drhd))) != 0 )
return ret;
+ if ( !drhd->address || !(drhd->address + 1) )
+ return -ENODEV;
+
dmaru = xmalloc(struct acpi_drhd_unit);
if ( !dmaru )
return -ENOMEM;