History

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()

Linus Torvalds committed 9 months ago

Commit b33d7062 parents c133687 374e7af3 files · +3 −4Browse files

Unified · Split

3 files
  1. drivers/iommu/amd/iommu.c +1 −2
  2. drivers/iommu/generic_pt/iommu_pt.h +1 −1
  3. drivers/iommu/io-pgtable-arm.c +1 −1
drivers/iommu/amd/iommu.c+1−2
@@ -2450,8 +2450,6 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev) · 2449 unmodified lines
2450 goto out_err;2450 goto out_err;
2451 }2451 }
2452 2452
2453out_err:
2454
2455 iommu_completion_wait(iommu);2453 iommu_completion_wait(iommu);
2456 2454
2457 if (FEATURE_NUM_INT_REMAP_SUP_2K(amd_iommu_efr2))2455 if (FEATURE_NUM_INT_REMAP_SUP_2K(amd_iommu_efr2))
@@ -2462,6 +2460,7 @@ out_err: · 4 unmodified lines
2462 if (dev_is_pci(dev))2460 if (dev_is_pci(dev))
2463 pci_prepare_ats(to_pci_dev(dev), PAGE_SHIFT);2461 pci_prepare_ats(to_pci_dev(dev), PAGE_SHIFT);
2464 2462
2463out_err:
2465 return iommu_dev;2464 return iommu_dev;
2466}2465}
2467 2466
drivers/iommu/generic_pt/iommu_pt.h+1−1
@@ -645,7 +645,7 @@ static __always_inline int __do_map_single_page(struct pt_range *range, · 644 unmodified lines
645 struct pt_iommu_map_args *map = arg;645 struct pt_iommu_map_args *map = arg;
646 646
647 pts.type = pt_load_single_entry(&pts);647 pts.type = pt_load_single_entry(&pts);
648 if (level == 0) {648 if (pts.level == 0) {
649 if (pts.type != PT_ENTRY_EMPTY)649 if (pts.type != PT_ENTRY_EMPTY)
650 return -EADDRINUSE;650 return -EADDRINUSE;
651 pt_install_leaf_entry(&pts, map->oa, PAGE_SHIFT,651 pt_install_leaf_entry(&pts, map->oa, PAGE_SHIFT,
drivers/iommu/io-pgtable-arm.c+1−1
@@ -637,7 +637,7 @@ static size_t __arm_lpae_unmap(struct arm_lpae_io_pgtable *data, · 636 unmodified lines
637 pte = READ_ONCE(*ptep);637 pte = READ_ONCE(*ptep);
638 if (!pte) {638 if (!pte) {
639 WARN_ON(!(data->iop.cfg.quirks & IO_PGTABLE_QUIRK_NO_WARN));639 WARN_ON(!(data->iop.cfg.quirks & IO_PGTABLE_QUIRK_NO_WARN));
640 return -ENOENT;640 return 0;
641 }641 }
642 642
643 /* If the size matches this level, we're in the right place */643 /* If the size matches this level, we're in the right place */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t