]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: set group default domain before creating direct mappings
authorJerry Snitselaar <jsnitsel@redhat.com>
Tue, 10 Dec 2019 18:56:06 +0000 (11:56 -0700)
committerJoerg Roedel <jroedel@suse.de>
Tue, 17 Dec 2019 10:45:17 +0000 (11:45 +0100)
commit33e2c049b5602dd35087bb2cb612820be1d29930
tree8316f7c786af466a4b0b45d76b3bf59390c28108
parent450e1755c60fcbc5094cbdb8696dbae19274b93c
iommu: set group default domain before creating direct mappings

iommu_group_create_direct_mappings uses group->default_domain, but
right after it is called, request_default_domain_for_dev calls
iommu_domain_free for the default domain, and sets the group default
domain to a different domain. Move the
iommu_group_create_direct_mappings call to after the group default
domain is set, so the direct mappings get associated with that domain.

Cc: Joerg Roedel <jroedel@suse.de>
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Cc: iommu@lists.linux-foundation.org
Cc: stable@vger.kernel.org
Fixes: a26c26ee0981 ("iommu: Add API to request DMA domain for device")
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c