Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102816633
D38072.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
979 B
Referenced Files
None
Subscribers
None
D38072.diff
View Options
diff --git a/sys/amd64/vmm/intel/vtd.c b/sys/amd64/vmm/intel/vtd.c
--- a/sys/amd64/vmm/intel/vtd.c
+++ b/sys/amd64/vmm/intel/vtd.c
@@ -446,6 +446,8 @@
struct vtdmap *vtdmap;
uint8_t bus;
+ KASSERT(dom != NULL, ("domain is NULL"));
+
bus = PCI_RID2BUS(rid);
ctxp = ctx_tables[bus];
pt_paddr = vtophys(dom->ptp);
diff --git a/sys/amd64/vmm/io/iommu.c b/sys/amd64/vmm/io/iommu.c
--- a/sys/amd64/vmm/io/iommu.c
+++ b/sys/amd64/vmm/io/iommu.c
@@ -258,6 +258,7 @@
}
IOMMU_DISABLE();
IOMMU_DESTROY_DOMAIN(host_domain);
+ host_domain = NULL;
IOMMU_CLEANUP();
}
diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c
--- a/sys/amd64/vmm/io/ppt.c
+++ b/sys/amd64/vmm/io/ppt.c
@@ -182,7 +182,9 @@
num_pptdevs--;
TAILQ_REMOVE(&pptdev_list, ppt, next);
pci_disable_busmaster(dev);
- iommu_add_device(iommu_host_domain(), pci_get_rid(dev));
+
+ if (iommu_host_domain() != NULL)
+ iommu_add_device(iommu_host_domain(), pci_get_rid(dev));
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 1:49 PM (21 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14698761
Default Alt Text
D38072.diff (979 B)
Attached To
Mode
D38072: vmm: fix use after free in ppt_detach()
Attached
Detach File
Event Timeline
Log In to Comment