[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xen-unstable (4.14 to be): Assertion '!preempt_count()' failed at preempt.c:36



On 05.12.2019 09:35, Durrant, Paul wrote:
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -1696,16 +1696,12 @@ int iommu_do_pci_domctl(
> 
>          pcidevs_lock();
>          ret = device_assigned(seg, bus, devfn);
> -        if ( domctl->cmd == XEN_DOMCTL_test_assign_device )
> +        if ( ret && domctl->cmd == XEN_DOMCTL_test_assign_device )
>          {
> -            if ( ret )
> -            {
> -                printk(XENLOG_G_INFO
> -                       "%04x:%02x:%02x.%u already assigned, or 
> non-existent\n",
> -                       seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
> -                ret = -EINVAL;
> -            }
> -            break;
> +            printk(XENLOG_G_INFO
> +                   "%04x:%02x:%02x.%u already assigned, or non-existent\n",
> +                   seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
> +            ret = -EINVAL;
>          }

But this seems wrong - you'd end up calling assign_device() even
for the XEN_DOMCTL_test_assign_device case, when ret is 0. All we
want is to delete the break statement afaict.

Jan

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.