Skip to content

Commit b33d706

Browse files
committed
Merge tag 'iommu-fixes-v6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux
Pull iommu fixes from Joerg Roedel: - AMD IOMMU: Fix potential NULL-ptr dereference in error path of amd_iommu_probe_device() - Generic IOMMUPT: Fix another compiler issue seen with older compiler versions - Fix signedness issue in ARM IO-PageTable code * tag 'iommu-fixes-v6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu/io-pgtable-arm: fix size_t signedness bug in unmap path iommupt: Make it clearer to the compiler that pts.level == 0 for single page iommu/amd: Fix error path in amd_iommu_probe_device()
2 parents c133687 + 374e7af commit b33d706

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/iommu/amd/iommu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,8 +2450,6 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev)
24502450
goto out_err;
24512451
}
24522452

2453-
out_err:
2454-
24552453
iommu_completion_wait(iommu);
24562454

24572455
if (FEATURE_NUM_INT_REMAP_SUP_2K(amd_iommu_efr2))
@@ -2462,6 +2460,7 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev)
24622460
if (dev_is_pci(dev))
24632461
pci_prepare_ats(to_pci_dev(dev), PAGE_SHIFT);
24642462

2463+
out_err:
24652464
return iommu_dev;
24662465
}
24672466

drivers/iommu/generic_pt/iommu_pt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ static __always_inline int __do_map_single_page(struct pt_range *range,
645645
struct pt_iommu_map_args *map = arg;
646646

647647
pts.type = pt_load_single_entry(&pts);
648-
if (level == 0) {
648+
if (pts.level == 0) {
649649
if (pts.type != PT_ENTRY_EMPTY)
650650
return -EADDRINUSE;
651651
pt_install_leaf_entry(&pts, map->oa, PAGE_SHIFT,

drivers/iommu/io-pgtable-arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ static size_t __arm_lpae_unmap(struct arm_lpae_io_pgtable *data,
637637
pte = READ_ONCE(*ptep);
638638
if (!pte) {
639639
WARN_ON(!(data->iop.cfg.quirks & IO_PGTABLE_QUIRK_NO_WARN));
640-
return -ENOENT;
640+
return 0;
641641
}
642642

643643
/* If the size matches this level, we're in the right place */

0 commit comments

Comments
 (0)