diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-22 12:48:05 +0200 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-28 18:06:47 +0200 |
commit | 0bc252f430d6a3ac7836d40f00d0ae020593b11b (patch) | |
tree | a8a4ae4cf393588fcb03efc1370da0efd745c33f /arch/x86/kernel/amd_iommu_init.c | |
parent | 7455aab1f95f6464c5af3fbdee28744e73f38564 (diff) | |
download | op-kernel-dev-0bc252f430d6a3ac7836d40f00d0ae020593b11b.zip op-kernel-dev-0bc252f430d6a3ac7836d40f00d0ae020593b11b.tar.gz |
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>
Diffstat (limited to 'arch/x86/kernel/amd_iommu_init.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 53f93db..a3a2b98 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c @@ -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; |