linux/drivers/iommu/intel
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
..
cache.c iommu/vt-d: Introduce batched cache invalidation 2024-09-02 18:15:03 +02:00
cap_audit.c iommu/vt-d: Remove virtual command interface 2023-03-31 10:03:21 +02:00
cap_audit.h
debugfs.c iommu/vt-d: Remove debugfs use of private data field 2024-04-26 11:57:38 +02:00
dmar.c iommu/vt-d: Factor out invalidation descriptor composition 2024-09-02 18:15:00 +02:00
iommu.c iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices 2024-10-15 10:17:54 +02:00
iommu.h Performance events changes for v6.12: 2024-09-18 15:03:58 +02:00
irq_remapping.c iommu/vt-d: Cleanup apic_printk() 2024-08-07 18:13:28 +02:00
Kconfig dma-mapping: direct calls for dma-iommu 2024-08-22 06:18:11 +02:00
Makefile iommu/vt-d: Add cache tag assignment interface 2024-04-26 11:57:40 +02:00
nested.c iommu/vt-d: Add qi_batch for dmar_domain 2024-09-02 18:15:02 +02:00
pasid.c Merge branches 'fixes', 'arm/smmu', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2024-09-13 12:53:05 +02:00
pasid.h iommu/vt-d: Remove control over Execute-Requested requests 2024-07-03 16:39:26 +01:00
perf.c iommu/vt-d: Use kcalloc() instead of kzalloc() 2024-03-01 13:51:18 +01:00
perf.h iommu/vt-d: Remove debugfs use of private data field 2024-04-26 11:57:38 +02:00
perfmon.c iommu/vt-d: Clean up cpumask and hotplug for perfmon 2024-09-10 11:44:13 +02:00
perfmon.h
svm.c iommu/vt-d: Add qi_batch for dmar_domain 2024-09-02 18:15:02 +02:00
trace.c
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00