mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
vtd: During parsing DMAR table, if find RMRR is incorrect, return error.
Signed-off-by: Weidong Han <weidong.han@intel.com>
This commit is contained in:
1 parent
ebb9d5bee5
commit
597683c799
1 file changed
+6
@@ -349,6 +349,12 @@ acpi_parse_one_rmrr(struct acpi_dmar_entry_header *header)
|
||||
void *dev_scope_start, *dev_scope_end;
|
||||
int ret = 0;
|
||||
|
||||
if ( rmrr->base_address >= rmrr->end_address )
|
||||
{
|
||||
dprintk(XENLOG_ERR VTDPREFIX, "RMRR is incorrect.\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
rmrru = xmalloc(struct acpi_rmrr_unit);
|
||||
if ( !rmrru )
|
||||
return -ENOMEM;
|
||||
|
||||