[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/78] intel_iommu: a fix to vtd_find_as_from_bus_num()
From: |
Michael Roth |
Subject: |
[PATCH 23/78] intel_iommu: a fix to vtd_find_as_from_bus_num() |
Date: |
Tue, 16 Jun 2020 09:14:52 -0500 |
From: Liu Yi L <yi.l.liu@intel.com>
Ensure the return value of vtd_find_as_from_bus_num() is NULL by
enforcing vtd_bus=NULL. This would help caller of vtd_find_as_from_bus_num()
to decide if any further operation on the returned vtd_bus.
Cc: qemu-stable@nongnu.org
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Yi Sun <yi.y.sun@linux.intel.com>
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
Message-Id: <1578058086-4288-2-git-send-email-yi.l.liu@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit a2e1cd41ccfe796529abfd1b6aeb1dd4393762a2)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
hw/i386/intel_iommu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 43c94b993b..00ebae4863 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -948,6 +948,7 @@ static VTDBus *vtd_find_as_from_bus_num(IntelIOMMUState *s,
uint8_t bus_num)
return vtd_bus;
}
}
+ vtd_bus = NULL;
}
return vtd_bus;
}
--
2.17.1
- [PATCH 15/78] ide: Fix incorrect handling of some PRDTs in ide_dma_cb(), (continued)
- [PATCH 15/78] ide: Fix incorrect handling of some PRDTs in ide_dma_cb(), Michael Roth, 2020/06/16
- [PATCH 16/78] target/arm: Set ISSIs16Bit in make_issinfo, Michael Roth, 2020/06/16
- [PATCH 17/78] virtio: update queue size on guest write, Michael Roth, 2020/06/16
- [PATCH 18/78] virtio-mmio: update queue size on guest write, Michael Roth, 2020/06/16
- [PATCH 19/78] virtio: add ability to delete vq through a pointer, Michael Roth, 2020/06/16
- [PATCH 20/78] virtio: make virtio_delete_queue idempotent, Michael Roth, 2020/06/16
- [PATCH 01/78] block/nbd: extract the common cleanup code, Michael Roth, 2020/06/16
- [PATCH 21/78] virtio: reset region cache when on queue deletion, Michael Roth, 2020/06/16
- [PATCH 27/78] dp8393x: Mask EOL bit from descriptor addresses, Michael Roth, 2020/06/16
- [PATCH 22/78] virtio-net: delete also control queue when TX/RX deleted, Michael Roth, 2020/06/16
- [PATCH 23/78] intel_iommu: a fix to vtd_find_as_from_bus_num(),
Michael Roth <=
- [PATCH 26/78] qcow2-bitmaps: fix qcow2_can_store_new_dirty_bitmap, Michael Roth, 2020/06/16
- [PATCH 30/78] dp8393x: Have dp8393x_receive() return the packet size, Michael Roth, 2020/06/16
- [PATCH 02/78] block/nbd: fix memory leak in nbd_open(), Michael Roth, 2020/06/16
- [PATCH 29/78] dp8393x: Clean up endianness hacks, Michael Roth, 2020/06/16
- [PATCH 24/78] intel_iommu: add present bit check for pasid table entries, Michael Roth, 2020/06/16
- [PATCH 25/78] vfio/pci: Don't remove irqchip notifier if not registered, Michael Roth, 2020/06/16
- [PATCH 32/78] dp8393x: Clear RRRA command register bit only when appropriate, Michael Roth, 2020/06/16
- [PATCH 31/78] dp8393x: Update LLFA and CRDA registers from rx descriptor, Michael Roth, 2020/06/16
- [PATCH 34/78] dp8393x: Don't clobber packet checksum, Michael Roth, 2020/06/16
- [PATCH 28/78] dp8393x: Always use 32-bit accesses, Michael Roth, 2020/06/16