aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-09-02 08:19:50 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2011-09-02 08:19:50 -0400
commite33acde91140f1809952d1c135c36feb66a51887 (patch)
tree86c6c7d7c76a311604843e919df141c30c5b1160 /drivers/iommu
parentf1ca1512e765337a7c09eb875eedef8ea4e07654 (diff)
iommu/amd: Don't take domain->lock recursivly
The domain_flush_devices() function takes the domain->lock. But this function is only called from update_domain() which itself is already called unter the domain->lock. This causes a deadlock situation when the dma-address-space of a domain grows larger than 1GB. Cc: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/amd_iommu.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 45652231dae8..0e4227f457af 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -847,14 +847,9 @@ static void domain_flush_complete(struct protection_domain *domain)
847static void domain_flush_devices(struct protection_domain *domain) 847static void domain_flush_devices(struct protection_domain *domain)
848{ 848{
849 struct iommu_dev_data *dev_data; 849 struct iommu_dev_data *dev_data;
850 unsigned long flags;
851
852 spin_lock_irqsave(&domain->lock, flags);
853 850
854 list_for_each_entry(dev_data, &domain->dev_list, list) 851 list_for_each_entry(dev_data, &domain->dev_list, list)
855 device_flush_dte(dev_data); 852 device_flush_dte(dev_data);
856
857 spin_unlock_irqrestore(&domain->lock, flags);
858} 853}
859 854
860/**************************************************************************** 855/****************************************************************************