Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e33acde9 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

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: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent f1ca1512
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -847,14 +847,9 @@ static void domain_flush_complete(struct protection_domain *domain)
static void domain_flush_devices(struct protection_domain *domain)
{
	struct iommu_dev_data *dev_data;
	unsigned long flags;

	spin_lock_irqsave(&domain->lock, flags);

	list_for_each_entry(dev_data, &domain->dev_list, list)
		device_flush_dte(dev_data);

	spin_unlock_irqrestore(&domain->lock, flags);
}

/****************************************************************************