Hi,

This is supposed to be fixed by this patch

https://lkml.org/lkml/2019/6/3/115

which is part of several RMRR related fixes and enhancements.

Best regards,
Baolu

On 6/12/19 12:55 AM, Qian Cai wrote:
On Sun, 2019-06-09 at 10:37 +0800, Lu Baolu wrote:
Hi Joerg,

This series includes several fixes and cleanups after delegating
DMA domain to generic iommu. Please review and consider them for
linux-next.

Best regards,
Baolu

Lu Baolu (5):
   iommu/vt-d: Don't return error when device gets right domain
   iommu/vt-d: Set domain type for a private domain
   iommu/vt-d: Don't enable iommu's which have been ignored
   iommu/vt-d: Fix suspicious RCU usage in probe_acpi_namespace_devices()
   iommu/vt-d: Consolidate domain_init() to avoid duplication

Sai Praneeth Prakhya (1):
   iommu/vt-d: Cleanup after delegating DMA domain to generic iommu

  drivers/iommu/intel-iommu.c | 210 +++++++++---------------------------
  1 file changed, 53 insertions(+), 157 deletions(-)


BTW, the linux-next commit "iommu/vt-d: Expose ISA direct mapping region via
iommu_get_resv_regions" [1] also introduced a memory leak below, as it forgets
to ask intel_iommu_put_resv_regions() to call kfree() when
CONFIG_INTEL_IOMMU_FLOPPY_WA=y.

[1] https://lore.kernel.org/patchwork/patch/1078963/

unreferenced object 0xffff88912ef789c8 (size 64):
   comm "swapper/0", pid 1, jiffies 4294946232 (age 5399.530s)
   hex dump (first 32 bytes):
     48 83 f7 2e 91 88 ff ff 30 fa e3 00 82 88 ff ff  H.......0.......
     00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00  ................
   backtrace:
     [<00000000d267f4be>] kmem_cache_alloc_trace+0x266/0x380
     [<00000000d383d15b>] iommu_alloc_resv_region+0x40/0xb0
     [<00000000db8be31b>] intel_iommu_get_resv_regions+0x25e/0x2d0
     [<0000000021fbc6c3>] iommu_group_create_direct_mappings+0x159/0x3d0
     [<0000000022259268>] iommu_group_add_device+0x17b/0x4f0
     [<0000000028b91093>] iommu_group_get_for_dev+0x153/0x460
     [<00000000577c33b4>] intel_iommu_add_device+0xc4/0x210
     [<00000000587b7492>] iommu_probe_device+0x63/0x80
     [<000000004aa997d1>] add_iommu_group+0xe/0x20
     [<00000000c93a9cd6>] bus_for_each_dev+0xf0/0x150
     [<00000000a2e5f0cb>] bus_set_iommu+0xc6/0x100
     [<00000000dbad5db0>] intel_iommu_init+0x682/0xb0a
     [<00000000226f7444>] pci_iommu_init+0x26/0x62
     [<000000002d8694f5>] do_one_initcall+0xe5/0x3ea
     [<000000004bc60101>] kernel_init_freeable+0x5ad/0x640
     [<0000000091b0bad6>] kernel_init+0x11/0x138


Reply via email to