linux/drivers/iommu/amd
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_types.h iommu/amd: Use maximum PPR log buffer size when SNP is enabled on Family 0x19 2026-04-27 13:49:36 +02:00
amd_iommu.h iommu/amd: Use maximum PPR log buffer size when SNP is enabled on Family 0x19 2026-04-27 13:49:36 +02:00
debugfs.c iommu/amd: Fix illegal cap/mmio access in IOMMU debugfs 2026-03-27 09:26:59 +01:00
init.c iommu/amd: Use maximum PPR log buffer size when SNP is enabled on Family 0x19 2026-04-27 13:49:36 +02:00
iommu.c iommu/amd: Fix precedence order in set_dte_passthrough() 2026-05-04 10:26:16 +02:00
iommufd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
iommufd.h iommu/amd: Fix type of type parameter to amd_iommufd_hw_info() 2026-01-28 15:13:01 +01:00
Kconfig iommu/amd: Add support for hw_info for iommu capability query 2026-01-18 10:56:09 +01:00
Makefile iommu/amd: Add support for nested domain allocation 2026-01-18 10:56:13 +01:00
nested.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pasid.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ppr.c iommu/amd: Use maximum PPR log buffer size when SNP is enabled on Family 0x19 2026-04-27 13:49:36 +02:00
quirks.c