x86/amd-iommu: Use helper function to destroy domain
commit78b124998ce07bb27cf23bd6d1a7337ba22cb262
authorJoerg Roedel <joerg.roedel@amd.com>
Mon, 8 Mar 2010 13:20:07 +0000 (8 14:20 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:47:56 +0000 (26 07:47 -0700)
tree424261495fb77f2dea1d2c5ea7899102f9ba8166
parent544e6619c3b8339698c96a05d26016013454e654
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>
arch/x86/kernel/amd_iommu.c