linux/drivers/iommu
Weinan Liu 10161b4a79 iommu/amd: Fix precedence order in set_dte_passthrough()
Bitwise OR | operator has a higher precedence than the ternary ?:
operatior. It will be incorrectly evaluated as:

new->data[1] |= (FIELD_PREP(...) | dev_data->ats_enabled) ? DTE_FLAG_IOTLB : 0;

Wrap the conditional operation in parentheses to enforce the
correct evaluation order.

Fixes: 93eee2a49c ("iommu/amd: Refactor logic to program the host page table in DTE")
Signed-off-by: Weinan Liu <wnliu@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-05-04 10:26:16 +02:00
..
amd iommu/amd: Fix precedence order in set_dte_passthrough() 2026-05-04 10:26:16 +02:00
arm Merge branches 'fixes', 'arm/smmu/updates', 'arm/smmu/bindings', 'riscv', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2026-04-09 13:18:27 +01:00
generic_pt Merge branches 'fixes', 'arm/smmu/updates', 'arm/smmu/bindings', 'riscv', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2026-04-09 13:18:27 +01:00
intel Merge branches 'fixes', 'arm/smmu/updates', 'arm/smmu/bindings', 'riscv', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2026-04-09 13:18:27 +01:00
iommufd iommufd v7.1 merge window pull request 2026-04-16 21:21:55 -07:00
riscv Merge branches 'fixes', 'arm/smmu/updates', 'arm/smmu/bindings', 'riscv', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2026-04-09 13:18:27 +01:00
apple-dart.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dma-iommu.c dma-mapping updates for Linux 7.0: 2026-04-17 11:12:42 -07:00
dma-iommu.h iommu: Tidy domain for iommu_setup_dma_ops() 2026-01-10 10:26:43 +01:00
exynos-iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
fsl_pamu_domain.c iommu: Pass in old domain to attach_dev callback functions 2025-10-27 13:55:35 +01:00
fsl_pamu_domain.h iommu/fsl_pamu: remove the snoop_id field 2021-04-07 10:56:52 +02:00
fsl_pamu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
fsl_pamu.h iommu/fsl_pamu: hardcode the window address and size in pamu_config_ppaace 2021-04-07 10:56:52 +02:00
hyperv-iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
io-pgfault.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
io-pgtable-arm-selftests.c iommu/io-pgtable-arm-selftests: Use KUnit 2025-11-13 16:25:32 +01:00
io-pgtable-arm-v7s.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
io-pgtable-arm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
io-pgtable-arm.h iommu/io-pgtable-arm: Move some definitions to a header 2020-09-28 23:48:06 +01:00
io-pgtable-dart.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
io-pgtable.c iommu/amd: Remove AMD io_pgtable support 2025-11-05 09:08:57 +01:00
iommu-debug-pagealloc.c iommu: debug-pagealloc: Use page_ext_get_from_phys() 2026-01-21 12:51:49 +01:00
iommu-debugfs.c
iommu-pages.c iommu/pages: Add support for incoherent IOMMU page table walkers 2025-11-05 09:47:43 +01:00
iommu-pages.h iommu/pages: Fix iommu_pages_flush_incoherent() for non-x86 2026-04-27 13:59:36 +02:00
iommu-priv.h iommu: Add calls for IOMMU_DEBUG_PAGEALLOC 2026-01-10 10:52:26 +01:00
iommu-sva.c iommu/sva: Fix crash in iommu_sva_unbind_device() 2026-03-17 14:00:36 +01:00
iommu-sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
iommu-traces.c iommu: Remove detach_dev callback 2023-01-13 16:39:18 +01:00
iommu.c Merge branches 'fixes', 'arm/smmu/updates', 'arm/smmu/bindings', 'riscv', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2026-04-09 13:18:27 +01:00
iova.c iommu/iova: Add NULL check in iova_magazine_free() 2026-03-17 13:28:37 +01:00
ipmmu-vmsa.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq_remapping.c IOMMU Updates for Linux v6.10 2024-05-18 10:55:13 -07:00
irq_remapping.h iommu/vt-d: Allocate DMAR fault interrupts locally 2024-04-26 11:57:36 +02:00
Kconfig iommu: Add page_ext for IOMMU_DEBUG_PAGEALLOC 2026-01-10 10:52:25 +01:00
Makefile iommu: Add page_ext for IOMMU_DEBUG_PAGEALLOC 2026-01-10 10:52:25 +01:00
msm_iommu_hw-8xxx.h
msm_iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
msm_iommu.h
mtk_iommu_v1.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mtk_iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
of_iommu.c iommu: Get DT/ACPI parsing into the proper probe path 2025-03-11 14:05:43 +01:00
omap-iommu-debug.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
omap-iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
omap-iommu.h iommu/omap: fix device leaks on probe_device() 2025-11-17 09:49:44 +01:00
omap-iopgtable.h iommu/omap: Fix -Woverflow warnings when compiling on 64-bit architectures 2020-03-04 16:24:46 +01:00
rockchip-iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
s390-iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sprd-iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sun50i-iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tegra-smmu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
virtio-iommu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00