|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] drivers/passthrough: fix error paths in p
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1306172132 -3600
# Node ID 4326bcd88b33ee4f567ab9aa22261726f1f068ab
# Parent 2e67194252654e9c46fc62968cabea528e0dd86d
drivers/passthrough: fix error paths in pci_add_device*()
When a device can't be allocated to dom0 by the IOMMU, don't leave
dom0 in the "domain" field. It causes pci_remove_device()
to crash trying to remove the dev from the domain's list of devices
(and was probably the wrong thing to do anyway).
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
diff -r 2e6719425265 -r 4326bcd88b33 xen/drivers/passthrough/pci.c
--- a/xen/drivers/passthrough/pci.c Mon May 23 18:35:04 2011 +0100
+++ b/xen/drivers/passthrough/pci.c Mon May 23 18:35:32 2011 +0100
@@ -158,7 +158,10 @@
pdev->domain = dom0;
ret = iommu_add_device(pdev);
if ( ret )
+ {
+ pdev->domain = NULL;
goto out;
+ }
list_add(&pdev->domain_list, &dom0->arch.pdev_list);
pci_enable_acs(pdev);
@@ -222,7 +225,10 @@
pdev->domain = dom0;
ret = iommu_add_device(pdev);
if ( ret )
+ {
+ pdev->domain = NULL;
goto out;
+ }
list_add(&pdev->domain_list, &dom0->arch.pdev_list);
pci_enable_acs(pdev);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] drivers/passthrough: fix error paths in pci_add_device*(),
Xen patchbot-unstable <=
|
|
|
|
|