From: Jiang Liu Date: Fri, 11 Jul 2014 06:19:30 +0000 (+0800) Subject: iommu/vt-d: Fix possible invalid memory access caused by free_dmar_iommu() X-Git-Tag: omap-for-v3.17/fixes-against-rc2~158^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a46ddf77c32da1f4137aeb902bc4e1f50582b69;p=pandora-kernel.git iommu/vt-d: Fix possible invalid memory access caused by free_dmar_iommu() Static identity and virtual machine domains may be cached in iommu->domain_ids array after corresponding IOMMUs have been removed from domain->iommu_bmp. So we should check domain->iommu_bmp before decreasing domain->iommu_count in function free_dmar_iommu(), otherwise it may cause free of inuse domain data structure. Signed-off-by: Jiang Liu Signed-off-by: Joerg Roedel --- Reading git-diff-tree failed