[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 31/32] intel_iommu: a fix to vtd_find_as_from_bus_num()
From: |
Michael S. Tsirkin |
Subject: |
[PULL v3 31/32] intel_iommu: a fix to vtd_find_as_from_bus_num() |
Date: |
Tue, 7 Jan 2020 11:31:50 -0500 |
From: Liu Yi L <address@hidden>
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: address@hidden
Cc: Kevin Tian <address@hidden>
Cc: Jacob Pan <address@hidden>
Cc: Peter Xu <address@hidden>
Cc: Yi Sun <address@hidden>
Signed-off-by: Liu Yi L <address@hidden>
Signed-off-by: Yi Sun <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
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 ee06993675..609b80750a 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;
}
--
MST
- [PULL v3 22/32] hw/pci/pci_host: Let pci_data_[read/write] use unsigned 'size' argument, (continued)
- [PULL v3 22/32] hw/pci/pci_host: Let pci_data_[read/write] use unsigned 'size' argument, Michael S. Tsirkin, 2020/01/07
- [PULL v3 23/32] vhost-user: add VHOST_USER_RESET_DEVICE to reset devices, Michael S. Tsirkin, 2020/01/07
- [PULL v3 24/32] vhost-user-scsi: reset the device if supported, Michael S. Tsirkin, 2020/01/07
- [PULL v3 25/32] hw: fix using 4.2 compat in 5.0 machine types for i440fx/q35, Michael S. Tsirkin, 2020/01/07
- [PULL v3 13/32] numa: Extend CLI to provide memory side cache information, Michael S. Tsirkin, 2020/01/07
- [PULL v3 26/32] virtio: make seg_max virtqueue size dependent, Michael S. Tsirkin, 2020/01/07
- [PULL v3 27/32] tests: add virtio-scsi and virtio-blk seg_max_adjust test, Michael S. Tsirkin, 2020/01/07
- [PULL v3 28/32] virtio-mmio: update queue size on guest write, Michael S. Tsirkin, 2020/01/07
- [PULL v3 29/32] virtio: reset region cache when on queue deletion, Michael S. Tsirkin, 2020/01/07
- [PULL v3 30/32] virtio-net: delete also control queue when TX/RX deleted, Michael S. Tsirkin, 2020/01/07
- [PULL v3 31/32] intel_iommu: a fix to vtd_find_as_from_bus_num(),
Michael S. Tsirkin <=
- [PULL v3 32/32] intel_iommu: add present bit check for pasid table entries, Michael S. Tsirkin, 2020/01/07