summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-03-08 14:20:07 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-26 07:47:56 -0700
commit78b124998ce07bb27cf23bd6d1a7337ba22cb262 (patch)
tree424261495fb77f2dea1d2c5ea7899102f9ba8166 /arch/x86
parent544e6619c3b8339698c96a05d26016013454e654 (diff)
downloadkernel-crypto-78b124998ce07bb27cf23bd6d1a7337ba22cb262.tar.gz
kernel-crypto-78b124998ce07bb27cf23bd6d1a7337ba22cb262.tar.xz
kernel-crypto-78b124998ce07bb27cf23bd6d1a7337ba22cb262.zip
x86/amd-iommu: Use helper function to destroy domain
commit 8b408fe4f853dcfa18d133aa4cf1d7546b4c3870 upstream. In the amd_iommu_domain_destroy the protection_domain_free function is partly reimplemented. The 'partly' is the bug here because the domain is not deleted from the domain list. This results in use-after-free errors and data-corruption. Fix it by just using protection_domain_free instead. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/amd_iommu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 0e9ab4af619..2e775169bdf 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -2379,9 +2379,7 @@ static void amd_iommu_domain_destroy(struct iommu_domain *dom)
free_pagetable(domain);
- domain_id_free(domain->id);
-
- kfree(domain);
+ protection_domain_free(domain);
dom->priv = NULL;
}