xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH] passthrough: add missed pcidevs_unlock following c/s cd7dedad820
@ 2019-12-04 21:31 Igor Druzhinin
  2019-12-04 22:06 ` Sander Eikelenboom
  2019-12-05  9:08 ` Jan Beulich
  0 siblings, 2 replies; 3+ messages in thread
From: Igor Druzhinin @ 2019-12-04 21:31 UTC (permalink / raw)
  To: xen-devel; +Cc: linux, jbeulich, 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

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
 xen/drivers/passthrough/pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index ced0c28..2593fe4 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -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 )
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] passthrough: add missed pcidevs_unlock following c/s cd7dedad820
  2019-12-04 21:31 [Xen-devel] [PATCH] passthrough: add missed pcidevs_unlock following c/s cd7dedad820 Igor Druzhinin
@ 2019-12-04 22:06 ` Sander Eikelenboom
  2019-12-05  9:08 ` Jan Beulich
  1 sibling, 0 replies; 3+ messages in thread
From: Sander Eikelenboom @ 2019-12-04 22:06 UTC (permalink / raw)
  To: Igor Druzhinin, xen-devel; +Cc: jbeulich

On 04/12/2019 22:31, Igor Druzhinin wrote:
> 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
> 
> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
> ---
>  xen/drivers/passthrough/pci.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
> index ced0c28..2593fe4 100644
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -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
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] passthrough: add missed pcidevs_unlock following c/s cd7dedad820
  2019-12-04 21:31 [Xen-devel] [PATCH] passthrough: add missed pcidevs_unlock following c/s cd7dedad820 Igor Druzhinin
  2019-12-04 22:06 ` Sander Eikelenboom
@ 2019-12-05  9:08 ` Jan Beulich
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2019-12-05  9:08 UTC (permalink / raw)
  To: Igor Druzhinin; +Cc: xen-devel, linux

On 04.12.2019 22:31, Igor Druzhinin wrote:
> 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
> 
> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
> ---
>  xen/drivers/passthrough/pci.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
> index ced0c28..2593fe4 100644
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -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
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-05  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 21:31 [Xen-devel] [PATCH] passthrough: add missed pcidevs_unlock following c/s cd7dedad820 Igor Druzhinin
2019-12-04 22:06 ` Sander Eikelenboom
2019-12-05  9:08 ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).