amd-iommu: make sure only ivmd entries are parsed

The bug never triggered. But it should be fixed to protect against
broken ACPI tables in the future.

[ Impact: protect against broken ivrs acpi table ]

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
Joerg Roedel 2009-05-22 12:48:05 +02:00
Родитель 7455aab1f9
Коммит 0bc252f430
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -906,6 +906,8 @@ static int __init init_unity_map_range(struct ivmd_header *m)
switch (m->type) {
default:
kfree(e);
return 0;
case ACPI_IVMD_TYPE:
e->devid_start = e->devid_end = m->devid;
break;