Skip to contentSkip to conversation

passthrough: add missed pcidevs_unlock following c/s cd7dedad820

PATCH In review Igor Druzhinin 3 participants 3 messages Dec 4, 2019 – Dec 5, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 passthrough: add missed pcidevs_unlock following c/s cd7dedad820

The locking responsibilities have changed and a premature break in this section now causes the following assertion:

Assertion '!preempt_count()' failed at preempt.c:36

---
 xen/drivers/passthrough/pci.c | 1 +
 1 file changed, 1 insertion(+)
xen/drivers/passthrough/pci.c +1 -0
index ced0c28..2593fe4 100644
@@ -1705,6 +1705,7 @@ int iommu_do_pci_domctl(
                        seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
                 ret = -EINVAL;
             }
+            pcidevs_unlock();
             break;
         }
         else if ( !ret )
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 17 lines · Igor Druzhinin

The locking responsibilities have changed and a premature break in this section now causes the following assertion:

Assertion '!preempt_count()' failed at preempt.c:36

---
 xen/drivers/passthrough/pci.c | 1 +
 1 file changed, 1 insertion(+)
xen/drivers/passthrough/pci.c +0 -0
index ced0c28..2593fe4 100644

xen/drivers/passthrough/pci.c int iommu_do_pci_domctl( · line 1711

Quoted 7 lines
xen/drivers/passthrough/pci.c +1 -0
@@ -1705,6 +1705,7 @@ int iommu_do_pci_domctl(
                        seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
                 ret = -EINVAL;
             }
+            pcidevs_unlock();
             break;
         }
         else if ( !ret )

Just tested and it works for me, thanks Igor!

--
Sander

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
In reply to Igor Druzhinin
Quoted 16 lines · Igor Druzhinin

The locking responsibilities have changed and a premature break in this section now causes the following assertion:

Assertion '!preempt_count()' failed at preempt.c:36

---
 xen/drivers/passthrough/pci.c | 1 +
 1 file changed, 1 insertion(+)
xen/drivers/passthrough/pci.c +0 -0
index ced0c28..2593fe4 100644

xen/drivers/passthrough/pci.c int iommu_do_pci_domctl( · line 1709

Quoted 5 lines
xen/drivers/passthrough/pci.c +1 -0
@@ -1705,6 +1705,7 @@ int iommu_do_pci_domctl(
                        seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
                 ret = -EINVAL;
             }
+            pcidevs_unlock();
             break;

As discussed on the thread of Sander's report, I think we'd be better off simply deleting the break statement.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel