From: Joerg Roedel Date: Mon, 21 Dec 2015 12:14:52 +0000 (+0100) Subject: iommu/amd: Flush IOMMU TLB on __map_single error path X-Git-Tag: v4.14-rc1~3980^2^7~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53b3b65aa5befe9e96e8f8708a76208190a07e14;p=platform%2Fkernel%2Flinux-rpi.git iommu/amd: Flush IOMMU TLB on __map_single error path There have been present PTEs which in theory could have made it to the IOMMU TLB. Flush the addresses out on the error path to make sure no stale entries remain. Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 8ff3331..42c0a81ba 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2493,6 +2493,8 @@ out_unmap: dma_ops_domain_unmap(dma_dom, start); } + domain_flush_pages(&dma_dom->domain, address, size); + dma_ops_free_addresses(dma_dom, address, pages); return DMA_ERROR_CODE;