Skip to content

Commit

Permalink
amd-iommu: make sure only ivmd entries are parsed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed May 28, 2009
1 parent 7455aab commit 0bc252f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0bc252f

Please sign in to comment.