linux/drivers/iommu
Lu Baolu 6e02a277f1 iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices
Previously, the domain_context_clear() function incorrectly called
pci_for_each_dma_alias() to set up context entries for non-PCI devices.
This could lead to kernel hangs or other unexpected behavior.

Add a check to only call pci_for_each_dma_alias() for PCI devices. For
non-PCI devices, domain_context_clear_one() is called directly.

Reported-by: Todd Brandt <todd.e.brandt@intel.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219363
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219349
Fixes: 9a16ab9d64 ("iommu/vt-d: Make context clearing consistent with context mapping")
Cc: stable@vger.kernel.org
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20241014013744.102197-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2024-10-15 10:17:54 +02:00
..
amd Merge branches 'fixes', 'arm/smmu', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2024-09-13 12:53:05 +02:00
arm iommu/arm-smmu-v3: Convert comma to semicolon 2024-10-08 18:38:34 +01:00
intel iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices 2024-10-15 10:17:54 +02:00
iommufd [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
apple-dart.c
dma-iommu.c dma-mapping: fix vmap and mmap of noncontiougs allocations 2024-09-22 18:47:51 +02:00
dma-iommu.h iommu/dma: Centralise iommu_setup_dma_ops() 2024-04-26 12:07:26 +02:00
exynos-iommu.c
fsl_pamu_domain.c iommu: Use of_property_present() 2024-09-04 11:31:01 +02:00
fsl_pamu_domain.h
fsl_pamu.c
fsl_pamu.h
hyperv-iommu.c
io-pgfault.c iommu: Handle iommu faults for a bad iopf setup 2024-08-23 11:16:39 +02:00
io-pgtable-arm-v7s.c iommu: Do not return 0 from map_pages if it doesn't do anything 2024-08-26 09:16:13 +02:00
io-pgtable-arm.c Merge branches 'fixes', 'arm/smmu', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2024-09-13 12:53:05 +02:00
io-pgtable-arm.h
io-pgtable-dart.c iommu: Do not return 0 from map_pages if it doesn't do anything 2024-08-26 09:16:13 +02:00
io-pgtable.c
iommu-debugfs.c
iommu-pages.h
iommu-priv.h Merge branch 'iommu/iommufd/attach-handles' into iommu/next 2024-07-12 16:57:42 +01:00
iommu-sva.c Merge branch 'iommu/iommufd/attach-handles' into iommu/next 2024-07-12 16:57:42 +01:00
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Set iommu_attach_handle->domain in core 2024-09-11 20:14:07 -03:00
iova.c iommu/iova: Add missing MODULE_DESCRIPTION() macro 2024-06-14 16:51:10 +02:00
ipmmu-vmsa.c ARM: 9417/1: dma-mapping: Pass device to arm_iommu_create_mapping() 2024-09-04 15:02:07 +01:00
irq_remapping.c IOMMU Updates for Linux v6.10 2024-05-18 10:55:13 -07:00
irq_remapping.h
Kconfig dma-mapping updates for linux 6.12 2024-09-19 11:12:49 +02:00
Makefile
msm_iommu_hw-8xxx.h
msm_iommu.c
msm_iommu.h
mtk_iommu_v1.c ARM: 9417/1: dma-mapping: Pass device to arm_iommu_create_mapping() 2024-09-04 15:02:07 +01:00
mtk_iommu.c
of_iommu.c iommu: Use of_property_present() 2024-09-04 11:31:01 +02:00
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c
s390-iommu.c iommu/dma: Centralise iommu_setup_dma_ops() 2024-04-26 12:07:26 +02:00
sprd-iommu.c iommu: sprd: Avoid NULL deref in sprd_iommu_hw_en 2024-07-23 17:09:28 +01:00
sun50i-iommu.c iommu: sun50i: Add H616 compatible string 2024-06-25 14:02:47 +02:00
tegra-smmu.c Merge branch 'iommu/fwspec-ops-removal' into iommu/next 2024-07-12 16:55:43 +01:00
virtio-iommu.c virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00