From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20140512003200.886376213@1wt.eu> Date: Mon, 12 May 2014 02:32:06 +0200 From: Willy Tarreau To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jitendra Bhivare , Willy Tarreau Subject: [ 006/143] intel-iommu: Flush unmaps at domain_exit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: 2.6.32-longterm review patch. If anyone has any objections, please let me know. ------------------ From: Jitendra Bhivare Backported Alex Williamson's commit to 2.6.32.y http://git.kernel.org/linus/7b668357810ecb5fdda4418689d50f5d95aea6a8 It resolves the following assert when module is immediately reloaded. kernel BUG at drivers/pci/iova.c:155! Call Trace: [] intel_alloc_iova+0xb5/0xe0 [] __intel_map_single+0xbe/0x210 [] intel_alloc_coherent+0xae/0x120 [] be_queue_alloc+0xb9/0x140 [be2net] [] be_rx_qs_create+0xca/0x370 [be2net] The issue is reproducible in 2.6.32.60 and also gets resolved by passing intel-iommu=strict to kernel. Signed-off-by: Jitendra Bhivare Signed-off-by: Willy Tarreau --- drivers/pci/intel-iommu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 5b680df..c1a7b01 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -1434,6 +1434,10 @@ static void domain_exit(struct dmar_domain *domain) if (!domain) return; + /* Flush any lazy unmaps that may reference this domain */ + if (!intel_iommu_strict) + flush_unmaps_timeout(0); + domain_remove_dev_info(domain); /* destroy iovas */ put_iova_domain(&domain->iovad); -- 1.7.12.2.21.g234cd45.dirty